server.user(fn)
server.user('/xxx',fn)
function mw(req,res,next){ console.log('i am a middleware') req.str='abc' next(); } function foo(req,res,next){ console.log(req.str) next(); } server.use(mw) server.use('/login', foo) server.use(()=>{ console.log('hi,there.') })