简体   繁体   中英

express.js file not found

I am new to express/node.js and I am having trouble finding the page at localhost:3000/info

The images of my code are linked below

app.js

index.js

I believe the problem is that you indeed create a route for the info page, but as far as I can see in the images you never tell express to use that route...

var infoRouter = require=('./routes/info');


app.use(inforRouter);

The first line is for loading the module, and the second one is for its execution

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM