gpt4 book ai didi

ruby-on-rails - 与 Rails(堆栈)目录相比,MEAN(堆栈)Node.js 应用程序目录是什么样的?

转载 作者:太空宇宙 更新时间:2023-11-03 23:37:28 26 4
gpt4 key购买 nike

这是我第一次查看 Node 堆栈,自从我学习使用 Ruby on Rails 进行 Web 开发以来,我对一些基本的东西有点困惑。我了解 Rails 目录是什么样的。

demo/
..../app
......../assets *Javascript, CSS, images, etc*
......../controller *Connect the model with the view*
......../helpers - *model & view assistance code*
......../models - *Database Structure*
......../views - *HTML CSS*
............../layouts *overall application view structure *
..../components
..../config *Server related stuff I only touch when pushing to production*
..../db *schema for database, db relationships defined by the model3*
..../doc
..../lib *Rake tasks, or custom tasks to populate the database*
..../log
..../public *Things I never touch/site map, custom error pages/SEO Stuff*
..../script *Things I never touch*
..../test *Things I never touch*
..../tmp *Things I never touch*
..../vendor *Things I never touch*
README
Rakefile

相比之下,MEAN 目录结构是什么样的?

最佳答案

它看起来就像你想要的那样。它更像是一个临时堆栈,而不是像 Rails 那样的完整框架。 E 代表express,它是一个流行的Node 框架。以下是常用的 Express 布局示例:

project/
controllers/
comments.js
index.js
users.js
helpers/
dates.js
middlewares/
auth.js
users.js
models/
comment.js
user.js
public/
libs/
css/
img/
views/
comments/
comment.jade
users/
index.jade
tests/
controllers/
models/
comment.js
middlewares/
integration/
ui/
.gitignore
app.js
package.json

关于ruby-on-rails - 与 Rails(堆栈)目录相比,MEAN(堆栈)Node.js 应用程序目录是什么样的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30339533/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com