-
-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
configurable hostname for sockjs-node #3071
Comments
I have the same request. @hasangilak has found the clue. If you need to serve documents that are dynamic rendered by a backend server, meaning you would have two servers: one is your backend server, the other is webDevServer. The two servers would occupy different ports. For example, your backend server listening at |
|
I have the same request. it is useful for dev when developing with another server :8080 with create react own :3000 one. |
+1 as above ^^ SPA is on port 3000, non SPA app which includes it is on port :8000... |
I fixed this problem in this PR #1994 but it never got merged, there was a lot of discussion about a better solution but I was never entirely sure what the better solution was. Would love to get this fixed. |
Agreed, I referenced another what looks to be related PR that never got merged either (#1588). I've gone for the less than ideal temporary solution that has been suggested in this jist and run that as part of the |
Chiming in with my +1 for CRA to support more configuration for these types of scenarios. I know CRA takes a stance on convention > configuration, but I think providing more configuration for applications that are more than an SPA consuming an API would be a great improvement. Much of the web is still running with server rendered content that relies on pre-loaded state, authentication, and routing handled server side, so seeing better support for those use cases would be great. Thanks for reading. |
For those use cases there are better tools like nwb. I encourage you to check them out. We can't possibly support all use cases, and intentionally focus on one: singe-page apps. |
I'm building a create-react-app server-side rendering boilerplate and this functionality would be fantastic. When the server's running on port 3000 and the client on port 3001 I can't take advantage of hot-reload. The code is available here: https://github.com/lgants/create-react-app-ssr. |
Also chiming with some additional support. We embed our CRA app in a separate site (different local port) by loading the bundle and it would be really helpful to have hotreloading. |
Did anyone tried to configure other way around proxying API Requests or may be I have some misconception of it? |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue. |
https://github.com/facebookincubator/create-react-app/blob/master/packages/react-dev-utils/webpackHotDevClient.js#L61-L69
as shown in this file there is no way to config hostname and everything about this sockjs-node ajax request. is there any reason for it that there is no configuration for it ?
I`m working on a product which is not spa. uses cookie sessions and there is no authentication token obviously. so I was in need of hot reload to. I load my react app inside the main app and for the hot reload I did change the source code of webpackHotDevClient to what I want in order to make /sockjs-node/info ajax works.
without changing this config /sockjs-node/info hits http://app.dev/sockjs-node/info but I want it to hit on http://localhost:3000/sockjs-node/info.
after this change things are working fines with hot reload on
The text was updated successfully, but these errors were encountered: