Skip to content

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

Closed
@truekonrads

Description

@truekonrads

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?

Activity

heyimalex

heyimalex commented on Feb 22, 2018

@heyimalex
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

Timer commented on Mar 5, 2018

@Timer
Contributor

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.

locked and limited conversation to collaborators on Jan 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Timer@heyimalex@truekonrads

        Issue actions

          How to host server-side scripts within react-app? · Issue #4056 · facebook/create-react-app