Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to host server-side scripts within react-app? #4056

Closed
truekonrads opened this issue Feb 21, 2018 · 2 comments
Closed

How to host server-side scripts within react-app? #4056

truekonrads opened this issue Feb 21, 2018 · 2 comments

Comments

@truekonrads
Copy link

Is this a bug report?

No

Hello, I have some server side code including sockets.io server compoent that should run in the background. Currently it runs outside as a separate process, but as it's integral to the react app, I would like to host it in same process, listening to a URI (e.g. /socket.io/). I don't want it to be proxied through as in this guide.

Is there a canonical create-react-app way to achieve this?

@heyimalex
Copy link
Contributor

Pretty sure that running in a separate process and connecting either directly or through the proxy is the canonical create-react-app way. It sounds like it's working for you, what's wrong?

@Timer
Copy link
Contributor

Timer commented Mar 5, 2018

You are responsible for running these things yourself as we do not handle applications in production.

If you are talking about DX, use something like concurrently or npm-run-all to start your scripts at the same time with one command.

@Timer Timer closed this as completed Mar 5, 2018
@lock lock bot locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants