admin管理员组文章数量:1420128
I'm searching for a video/blog post or something related that help me organize my node.js web application.
I have an application where i am using express.js upon node.js.
I'm using:
Mvc pattern,
i18n,
config env prod/dev,
custom middlewares,
custom prototypes
custom modules
I need organize better the folder structure, but i don't know exactly how.
I already search for this, but i was only able to find poor explanations about an good folder structure in a node.js app.
The app also have an admin dashboard, so i am separating the public, views and controllers like this:
public
|-- admin
|-- client
views
|-- admin
|-- client
controllers
|-- admin
|-- client
This is a good idea?
Anyone knows a good book, video or blog post that can help me with my problem?
I'm searching for a video/blog post or something related that help me organize my node.js web application.
I have an application where i am using express.js upon node.js.
I'm using:
Mvc pattern,
i18n,
config env prod/dev,
custom middlewares,
custom prototypes
custom modules
I need organize better the folder structure, but i don't know exactly how.
I already search for this, but i was only able to find poor explanations about an good folder structure in a node.js app.
The app also have an admin dashboard, so i am separating the public, views and controllers like this:
public
|-- admin
|-- client
views
|-- admin
|-- client
controllers
|-- admin
|-- client
This is a good idea?
Anyone knows a good book, video or blog post that can help me with my problem?
Share Improve this question asked Feb 18, 2015 at 16:29 user4520762user45207621 Answer
Reset to default 2This looks like a pretty solid thread on Node App structure.
In my own opinion, I always try to follow the rule of never repeating yourself in development. Looks like you are repeating your structure a lot above. If I were you I would do one of the following:
- Make two separate Node apps. One for clients and one for admin.
- If your controllers are going to be similar for both client or admin, I would consider building one app that identifies a user as a general user or an admin and render their experience that way. Then just throw away the admin/client folders.
EDIT:
Scotch.io always has great articles on Node and Express. See if this article or their other articles help.
Best Answer:
After some team research we found this link to be most useful. It has a great five folder layout for an admin panel and client experience.
本文标签: javascriptHow to organize folder structure in nodejsStack Overflow
版权声明:本文标题:javascript - How to organize folder structure in node.js? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745324898a2653545.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论