Home
Sign Up
Sign In
Advertisement
V2EX
›
Node.js
wryyyyy,如果我想让 Controller 在自己的文件中注册自己,那么,我的入口要怎么设计呢
jerry4718
·
Jul 13, 2018
· 4350 views
This topic created in 3042 days ago, the information mentioned may be changed or developed.
wryyyyy,因为我不希望每次添加了 controller 的时候,还要去入口文件中修改并且引入,,,
等等,我好像想到办法了,但是还是想发出去怎么办
wryyyyy
controller
正文
入口
2 replies
•
2018-07-28 14:19:12 +08:00
xcstream
Jul 20, 2018
1
fs.dir 列出 js 文件,写个循环去 require
jerry4718
OP
Jul 28, 2018
2
@
xcstream
是的,是我想的复杂了
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
922 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 24ms ·
UTC 20:39
·
PVG 04:39
·
LAX 12:39
·
JFK 15:39
♥ Do have faith in what you're doing.
❯