I am using node.js and express and trying to create a simple application that answers to the route 'localhost/games' on port 3000
When I use the root index, 'localhost:3000' the application works fine. However, when I change this route to 'localhost/games:3000' I get connection refused with the exact same code.
Has anyone experienced this problem and know how to fix it?
It does not have the right approach. You need to do (localhost:port/foo)
localhost:3000/games
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.