express学习过程中问题2 TypeError: Cannot call method 'toLowerCase' of undefined

问题原因:版本问题

解决方法:

   app.use(app.router); //保留原来的
    // app.use(app.router(routes));node.js开发指南上面的(注释掉)

添加

routes(app); //这个是新加的
原文地址:https://www.cnblogs.com/ltchronus/p/3479141.html