I want to serve another static page for the route "/about", now I have :
app.use(express.static(path.resolve(__dirname, '..', 'build')));
app.get('/', (req, res) => {
res.sendFile(path.resolve(__dirname, '..', 'build', 'index.html'));
});
app.get('/about', function (req, res) {
console.log("here")
res.sendFile(path.resolve(__dirname, '..', 'build', 'about.html'));
});
and I also have a post request
app.post('/getfrontpage', (req, res) => {
console.log("FIRST PAGE", req.body.params.page)
});
The post request works, I use axios to make a call, but the "/about" route doesn't work when I'm changing the url