Express.static good enought ? Nginx Apache not necessary ?
tomtom94 opened this issue · comments
What you mean when you said that in commentary https://github.com/manuelbieh/react-ssr-setup/blob/master/src/server/index.ts#L20
// Use Nginx or Apache to serve static assets in production or remove the if() around the following
// lines to use the express.static middleware to serve assets for production (not recommended!)
if (process.env.NODE_ENV === 'development') {
app.use(paths.publicPath, express.static(path.join(paths.clientBuild, paths.publicPath)));
}
Me I would like to use express.static middleware to serve assets, what's wrong with it ?