提交 8fb18f03 编写于 作者: N Nzix

error fixed

上级 d1ae7f4b
......@@ -87,7 +87,7 @@ fs.readdirSync(path.join(__dirname, 'router'))
.forEach(file => {
if (!/\.js$/i.test(file)) return
let route = (file in UnusualRouteFileMap) ? UnusualRouteFileMap[file] : '/' + file.replace(/\.js$/i, '').replace(/_/g, '/')
app.use(route, Wrap(path.join(__dirname, 'router', file)))
app.use(route, Wrap(require(path.join(__dirname, 'router', file))))
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册