在部署IIS应用程序的角度
我的工作与node.js中AngularJs应用使用一饮而尽,我已经创建(编译)我的应用程序(应用
在下面的图像),并得到了以下目录
I am working on AngularJs application with node.js. Using gulp, I have created (compiled) my application (app
in below image) and got the following directories
现在我彻底打接下来该怎么继续。我想举办这个应用程序在IIS运行,看到的页面(在的意见
文件夹中),但我不知道如何来承载它IIS。
Now I completely struck how to proceed next. I want to host this application over IIS to run and see the pages (in views
folder) but I don't know how to host it on IIS.
我试过这个文章,但它指导使用前preSS服务器。
I tried this article, but it guides to use express server.
问题是,IIS将如何弄清楚,第一页就在于的意见
文件夹,即使我用的是完整的URL
The issue is, how IIS will figure out that the first page lies in views
folder, and even if I use the complete url
http://localhost:8078/views/index.html
它为我所有的角code括号像 {{} logginuser}
等
编辑:
我需要web.config文件在这里与否。如果是的话那么我是如何将定义入口点的应用程序?
Do I need web.config file here or not. If yes then how I will define entry point to the application?
只是要在IIS中配置一个网站下的Web应用程序并创建自定义的web.config。
Just have to configure a Web Application under a website in IIS and create a custom web.config.
- 在IIS中,转到默认Web站点,右键单击并选择添加Web应用程序
- 设置别名是AngularApp和物理路径是你的根目录
-
在目录的根目录添加web.config文件具有以下code
< XML版本=1.0编码=UTF-8&GT?;
<结构>
< system.webServer>
< defaultDocument>
<&文件GT;
<增加价值=查看/ index.html的/>
< /文件>
< / defaultDocument>
< /system.webServer>
< /结构>
浏览到您的新的角度应用程序通过将的http://本地主机/ AngularApp (假设在HTTP绑定IIS)。
Browse to your new Angular application by going to http://localhost/AngularApp (assuming http binding in IIS).