In my server.ts file the line
app.get('/example', express.static('somefolder'));
gives me a 404, whereas
app.use('/example', express.static('somefolder'));
correctly serves the 'index.html' from 'somefolder' as a response to requests to 'myhost/example'.
According to the express documentation these should behave exactly the same in cases of GET requests. Why does one work and the other doesn't?
via user3636325
No comments:
Post a Comment