Closed
Description
I am facing an issue when in production if the urls are entered directly in the browser address bar it returns a 404 error. This is working properly in development. I was using a simple express server for production.
var express = require('express'),
app = express(),
http = require('http'),
httpServer = http.Server(app);
app.use(express.static(__dirname + '/build'));
app.get('/', function(req, res) {
res.sendfile(__dirname + '/index.html');
});
app.listen(3001);
Then i found out that this is happening as the server is not configured to handle the push state.
Then i decided to use pushstate-server to serve the production build according to create-react-app guidelines. Can i use this server as the live server to handle approximately 40 000 unique visits per day.
Thanks and Br,
Metadata
Metadata
Assignees
Labels
No labels