angular - 如何运行在起来 - 使用nginx

nginx下载地址,使用的是标准版的:

点击下载nginx

 

nginx下载完后,解压

dist文件夹下面所有angular文件放入html文件夹中.

 

 

最后命令行cd到当前nginx.exe目录,启动命令:nginx

再配置一下conf文件夹下面的nginx.conf

 

 

再location / 添加一条:

try_files $uri $uri/ /index.html;

 

最后打开浏览器:http://localhost/index.html ,即可访问到示例.

 

posted @ 2018-07-26 10:25  Sunsin  阅读(515)  评论(0编辑  收藏  举报