0

I am using generator to create a angular projects:

https://github.com/yeoman/generator-angular

Loading the website give me this error:

You do not have permission to view this directory or page.

I added 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>

It has a grunt file and doesn't have server.js or app.js as start. How do I go about it?

Alvin
  • 8,219
  • 25
  • 96
  • 177

2 Answers2

1

iisnode will pick app.js or server.js at the root directory (wwwroot) by default. You can override this in web.config. Even you are using grunt, your app should have an entry file somewhere . Say it is at path bin/www/youApp.js, then you can tell iisnode to where to start the app by

  <add name="iisnode" path="bin/www/youApp.js" verb="*" modules="iisnode"/>
George Chen
  • 6,592
  • 5
  • 21
  • 23
  • generator-angular does not generate this bin/www/server.js file. – Alvin Mar 17 '16 at 02:51
  • The problem is I can't find the nodejs entry point... Anyway it is just a angular website, without needing nodejs. – Alvin Mar 17 '16 at 02:53
0

You can solve it by telling where is the application folder:

  1. Adding a file called .deployment.
  2. Add the below to the .deployment:

    [config] project = app

Alvin
  • 8,219
  • 25
  • 96
  • 177