简体   繁体   English

github上的Angular Full Stack示例

[英]Angular Full Stack Example on github

I am trying to understand the example of Angular full stack project but I am not able to do so! 我试图理解Angular完整堆栈项目的例子,但我无法这样做! The project is here: 该项目在这里:

https://github.com/DavideViolante/Angular-Full-Stack https://github.com/DavideViolante/Angular-Full-Stack

in the package.json, you can find a "dev" script to test locally the app. 在package.json中,您可以找到一个“dev”脚本来本地测试应用程序。 the command is the following: 命令如下:

concurrently \"mongod\" \"ng serve -pc proxy.conf.json --open\" \"tsc -w -p server\" \"nodemon dist/server/app.js\"

I don't understand why ng serve is called and app.js also. 我不明白为什么要调用ng serve和app.js。 I mean ng serve create a static file server and there is also a static file server with Express. 我的意思是服务创建一个静态文件服务器,还有一个带Express的静态文件服务器。 So launching that starts two servers. 所以启动启动两个服务器。 What's the point? 重点是什么?

Here is a breakdown of all command 这是所有命令的细分

concurrently -- runs all command simultaneoulsy 并发 - 同时运行所有命令

\\"mongod\\" -- To Start MongoDB server \\“mongod \\” - 启动MongoDB服务器

\\"ng serve -pc proxy.conf.json --open\\" -- To serve angular stuff \\“ng serve -pc proxy.conf.json --open \\” - 提供有角度的东西

\\"tsc -w -p server\\" -- run the compiler in watch mode and compile project \\“tsc -w -p server \\” - 在监视模式下运行编译器并编译项目

\\"nodemon dist/server/app.js\\" -- to run your server side project \\“nodemon dist / server / app.js \\” - 运行服务器端项目

I don't know this project but the app.js normally is for the back-end and the ng serve is for serving an angular project in your development environment. 我不知道这个项目,但app.js通常用于后端,而ng服务用于在开发环境中提供角度项目。

I hope this help. 我希望这有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM