2013年7月1日月曜日

How to run angular tutorial with IIS 7 or node.js


If you are a developer with Windows machine and want to play with AngularJS, here are the steps.

Downloading Angular tutorial

  1. Create a clone on your machine
    1. Go to https://github.com/angular/angular-phonecat
    2. Choose "Clone in Desktop" (This asks you to give permission to start GitHub windows client)
  2. Download a given "step" within the turoial
    1. Run "git checkout -f -step-0" (here 0 should change depending on which step you want)


    Running Angular tutorial using IIS

    1. Create a new test website
      1. Navigate to "Sites" folder
      2. Right-mouse click and choose "Add Web Site..."
        1. Name it "angulartest"
        2. Point to the directory where Angular tutorial web site exists
        3. Set Port value to 85 (or 86 or 8080, or whatever unused on your system)
    2. Configure permissions
      1. Right-mouse click on "angulartest" website and choose "Edit permissions..."
        1. Under "Sharing" tab, share the folder with "Everyone"
        2. Under "Security" tab, add "Everyone" to the list of users.
    3. Configure application pool for the test website
      1. In IIS, select "Application Pools"
      2. Select "angulartest" from the list
      3. Select "Basic settings..." from the Actions on the right hand side
      4. In Edit Application Pool
        1. Set "No Managed Code" to .NET Framework version
        2. Set "Classic" for Managed pipeline mode
      5. Select "Advanced settings..." from the Actions on the right hand side
        1. Set "NetworkService" at Identity property
    4. Run angular tutorial in a web browser
      1. Browse to localhost:85/app/index.html

    Running Angular tutorial using Node.JS

    1. Install node.js (just download an installer)
    2. Install http-server package
      1. Run "npm install http-server- g"
    3. Start web server
      1. CD into the root directory of Angular Tutorial
      2. Run "http-server -p85  (-p is to specify port)
    4. Run angular tutorial in a web browser
      1. Browse to localhost:85/app/index.html

    0 件のコメント:

    コメントを投稿