node and reactjs axios server request returning index.html file instead of json
问题 I have setup my project with a react frontend being compiled by webpack and the server running on node and express. When I deploy to production my requests to the server are returning the index.html file in the 'dist' folder rather than the json with the data. My webpack compiled output is at the location ./dist. Here is the routing part of my server.js file: if (process.env.NODE_ENV === 'production') { app.use(express.static('dist')); const path = require('path'); app.get('/', (req, res) =>