[英]Angular 2 / angular-cli: How to deploy on a webserver
What software do I need on the Web server to Angular 2 app to get it working? 我需要在Web服务器上的Angular 2应用程序上使用什么软件才能使其正常工作? Or I can just upload the files to the web server? 或者我可以将文件上传到Web服务器?
Do you use angular-cli ? 您是否使用angular-cli ? (I'd recommend you to use it if you haven't). (如果没有,我建议您使用它)。 Because you just can do this command on your terminal 因为您可以在终端上执行此命令
ng build -prod --output-path=path/to/home/of/web/server/
What it does, it builds your app and generate dist
folder, in this case because you specified the output, it directly generate the dist content inside the path. 它的作用是生成您的应用程序并生成dist
文件夹,在这种情况下,因为您指定了输出,它会直接在路径内生成dist内容。
Hope it helps. 希望能帮助到你。
Yes, just upload files. 是的,只需上传文件。 Angular is a JavaScripts framework that runs on web browser.Just make sure your all TyperScipt files are complied in JavaScript. Angular是一个可在Web浏览器上运行的JavaScripts框架。只需确保所有TyperScipt文件都已在JavaScript中编译。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.