首先看例子: var express = require('express'); var router = express.Router(); var index = require('./router/index'); //① app.use('/test1',function(req,res,next){ res.send('this is test1'); }); //② app.get('/test2',function(req,res,next){ res.send('this is…