I am creating an Angular application that runs using Express on Node.
What I would like to do is when a user visits the site, adds his locale to the URL (domain.com/en-gb).
Then no matter what language they specify, it serves the same index.html.
app.use('/', function(req, res) {
res.sendFile(__dirname + '/public/index.html');
});
The problem I ran into is how to process the same file regardless of the request, but do I allow objects like images not to be redirected to index.html?
Thanks Harry
source
share