I'am have a bundle.js file that is attached with my index.html. I use a dynamic path at first :
app.get('/*', function(req, res) {
res.sendFile(path.join(__dirname + '/src/index.html'));
});
When I connect to localhost:8080/something, the html is sent but the div where the bundle is supposed to be displayed is empty.
But when I change the path to static one (like app.get('/',..)
) and connect to localhost:8080/, the bundle is displayed.
How can I make this work with a dynamic path?
via Mit
No comments:
Post a Comment