Skip to content
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

Improve API DX #67

Open
richardscarrott opened this issue Nov 24, 2016 · 3 comments
Open

Improve API DX #67

richardscarrott opened this issue Nov 24, 2016 · 3 comments

Comments

@richardscarrott
Copy link
Member

The initial intention of the Node server was to just render the client react app and serve static assets which is why the webpack server bundle get's hot reloaded but the regular api routes don't.

We can't use nodemon to restart the server every time because that'd cause the webpack middlewares to restart which would be sloooooow so it'd be good to investigate a nice solution for this...may have to start two servers and proxy requests from the API server to the dev server although this is something I was hoping to avoid.

@monteiz
Copy link

monteiz commented Jul 26, 2017

Hi @richardscarrott,
have you found a solution for that?

@richardscarrott
Copy link
Member Author

@monteiz I recently implemented webpack-hot-server-middleware on another project where the api was reasonably substantial so we needed live reload.

The only solution I found was to use nodemon on the main server and proxy requests to a custom dev server which mounts webpack-dev-middleware and webpack-hot-server-middleware. It works fine but just means you need to start up two servers during development.

@monteiz
Copy link

monteiz commented Sep 8, 2017

@richardscarrott I have ended up doing the same thing in fact, thanks.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants