I have just started a brand new Express app following the Code Magazine's tutorial .
Here's my app and the /img
route definitions.
When I browse to http://localhost:3000/img
or http://localhost:3000/img/
, I gets a 404 Not Found
response.
What am I missing?
You are mounting your /img
route on /img
. That is to say, you would need to GET /img/img
to hit your route. Replace /img
with /
in your img.js
file.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.