我在app.js里设置了一些东西和中间件的使用声明等,
目录结构如下:
---app.js
---routes
1 2 |
|
1 2 3 4 5 |
|
然后我在reg.js里:
1 2 3 |
|
结果程序报错说app.get() is not a function,然后app没有获取到怎么回事呢?
阿神2017-04-10 17:21:48
是在route里导出route,然后在app.js里use reg.js的。
应该是长这样的:
//reg.js
1 2 3 4 5 6 7 8 9 10 11 |
|
//app.js
1 2 3 4 5 6 7 8 9 10 11 |
|