Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 带有Angular2项目的ExpressJs的文件结构_Node.js_Express_Angular - Fatal编程技术网

Node.js 带有Angular2项目的ExpressJs的文件结构

Node.js 带有Angular2项目的ExpressJs的文件结构,node.js,express,angular,Node.js,Express,Angular,典型的ExpressJs和Angular2文件结构是什么样子的。 目前,我有以下几点: Project | |--bin |--node_modules |--public |--images |--javascripts |--stylesheets |--routes |--views |--app.js |--package.json 在我的公用文件夹中,我有index.pug和layout.pug。这是expressJs提供的默认结构。现

典型的ExpressJsAngular2文件结构是什么样子的。 目前,我有以下几点:

 Project
 |
 |--bin
 |--node_modules
 |--public
     |--images
     |--javascripts
     |--stylesheets
 |--routes
 |--views
 |--app.js
 |--package.json

在我的公用文件夹中,我有index.pug和layout.pug。这是expressJs提供的默认结构。现在我想添加Angular2,我将把我的角度文件放在哪里?我可以用带玉的胸带吗?让我添加一个新的节点。谢谢

看起来您想要的是类似于标准平均堆栈应用程序的东西(尽管您的数据库可能不是MongoDB)。应使用在该项目目录中自动生成Angular2项目,如图所示:

Project
|-angular2-project-directory/
    |--src/
    |--package.json
    |--README.md
    |--...(Other Angular CLI generated files)
|--routes/
|--views/
|--app.js
|--package.json
希望这有帮助