路由处理器组链以及localhost问题

在js页中加入接口 

module.exports = router;

在app.js页中

1.加入类似

var indexRouter = require('./routes/index');

的对应值


2.加入类似

app.use('/', indexRouter);

的对应值。


对于我等windows用户来说,设置localhost访问端口的指令为 set port=3000 (端口号可以自己设置,我这里设置的是3000)

猜你喜欢

转载自blog.csdn.net/TimeY0/article/details/80982768