KleoPetroff/react-webpack-boilerplate

Able to to add an Express server (to serve App + Provide an API)

Closed this issue · 1 comments

So I'd like to begin by saying I really love this boilerplate!

After adding my 2nd page in my routes, I realised that I could not refresh my other page as it was returning 404, I added historyApiFallback: true to the devServer object in the webpack.config.js to fix this problem.

I then realised only the development server would be able to handle the refresh, therefore I would need an Express server to handle refresh in production.

I was wondering if you could add an Express server to serve the App in production and also alongside the webpack dev-server in development (for API use etc.)?

Thank you in advance
Danny

So I managed to write this with some help from our friend Google! - Sorry to waste your time :)