Azure Web 应用中的 Yeoman angular 项目
Yeoman angular project in Azure web app
我正在使用生成器创建 angular 个项目:
https://github.com/yeoman/generator-angular
加载网站时出现此错误:
You do not have permission to view this directory or page.
我添加了iinode web.config:
<handlers>
<add name="iisnode" path="app.js" verb="*" modules="iisnode"/>
</handlers>
<rewrite>
<rules>
<rule name="DynamicContent">
<match url="/*" />
<action type="Rewrite" url="app.js"/>
</rule>
</rules>
</rewrite>
它有一个 grunt 文件,但没有 server.js
或 app.js
作为开头。我该怎么做?
默认情况下,iisnode 将在根目录 (wwwroot) 中选择 app.js 或 server.js。您可以在 web.config 中覆盖它。即使您使用的是 grunt,您的应用程序也应该在某处有一个入口文件。假设它在路径 bin/www/youApp.js,那么你可以通过
告诉 iisnode 从哪里启动应用程序
<add name="iisnode" path="bin/www/youApp.js" verb="*" modules="iisnode"/>
您可以通过告诉应用程序文件夹在哪里来解决它:
- 正在添加一个名为
.deployment
的文件。
将以下内容添加到 .deployment
:
[配置]
项目=应用程序
我正在使用生成器创建 angular 个项目:
https://github.com/yeoman/generator-angular
加载网站时出现此错误:
You do not have permission to view this directory or page.
我添加了iinode web.config:
<handlers>
<add name="iisnode" path="app.js" verb="*" modules="iisnode"/>
</handlers>
<rewrite>
<rules>
<rule name="DynamicContent">
<match url="/*" />
<action type="Rewrite" url="app.js"/>
</rule>
</rules>
</rewrite>
它有一个 grunt 文件,但没有 server.js
或 app.js
作为开头。我该怎么做?
iisnode 将在根目录 (wwwroot) 中选择 app.js 或 server.js。您可以在 web.config 中覆盖它。即使您使用的是 grunt,您的应用程序也应该在某处有一个入口文件。假设它在路径 bin/www/youApp.js,那么你可以通过
告诉 iisnode 从哪里启动应用程序 <add name="iisnode" path="bin/www/youApp.js" verb="*" modules="iisnode"/>
您可以通过告诉应用程序文件夹在哪里来解决它:
- 正在添加一个名为
.deployment
的文件。 将以下内容添加到
.deployment
:[配置] 项目=应用程序