vue, express and heroku => folder throwing 404

Viewed 21

I am serving a vue app productive with heroku via express. The problem is that sub folders are not working as expected although the Vue Router is correctly configured. In short, the URL https://www.example.org/fr is throwing a 404 in production while it works in dev.

I tried to configure the express server as following:

app.get('/fr', (req, res) => {
  res.sendFile('./index.html', { root: __dirname });
});

but still seeing 404

why are sub folders not working with express and how can I make them run? Thank you

0 Answers
Related