Provide API to integrate with custom servers
Created by: jlongster
The main problem I have so far is that I have my own node server for the backend. I could run both that and the create-react-app
server, but I think we've learned from webpack's dev server that it's not ideal to have to manage 2 processes.
Would you be open to exposing an API for this project in addition to the CLI? One option is for it to take an express server and add all the url handlers, but then you're binding yourself down to express which you probably don't want. Of course, if you moved away from express it'd be impossible to integrate with existing express servers anyway.
Isn't there a way for node's low-level http
servers to be composed? If so, you could make sure that requests go through the dev server first, and then through the user's server. Theoretically that means the types of server's don't have to match (the dev server could be using express, the user's hapi).