the express server doesn't know how to host the static files generated by created webpack.
put app.use(express.static('build')) to tell express where to look for them.
@Lou maybe this should be included in the article.
Re-thinking developer experience • Product @Gitpod 🍊 Helping folks get their start in cloud • @openupthecloud ☁️ AWS Community Builder 🛠 Replies in GIFS 😃
But depending on how you're referencing the build folder it may depend on where you're the server start commands from. Try as @jaspersurmont
to ensure that you're correctly pointing to the build folder, and that it has at the least an index.html inside.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
the express server doesn't know how to host the static files generated by created webpack.
put
app.use(express.static('build'))
to tell express where to look for them.@Lou maybe this should be included in the article.
Thanks @bordenjardine . The post does currently refer to the build folder:
app.use(express.static(path.join(__dirname, 'build')));
But depending on how you're referencing the build folder it may depend on where you're the server start commands from. Try as @jaspersurmont to ensure that you're correctly pointing to the build folder, and that it has at the least an index.html inside.