Host AngularJS in IISEXPRESS for Development - 10/27/2014

So, yes, if you have Visual Studio and load Mads excellent extensions you can do AngularJS development.

But, if you want to use the editor of your choice, and run your pages and the browser is not really doing it, you can use IISEXPRESS

Drop the following script into the root folder of the AngularJS application.

@REM Change this port to whatever is desired
@set port=8099
@REM This could be in the (x86) folder
@set iisdir="C:\Program Files\IIS Express\"
@set iis=iisexpress.exe
@set app="%CD%"
@pushd%iisdir%
%iis% /port:%port% /path:%app%
@popd

This results in the following output, w. nice logging to the console

Successfully registered URL "http://localhost:8099/" for site "Development Web Site" application "/"
Registration completed

Then you can open your favorite browser and go to

http://localhost:8099
or whatever port your set in the script above. This yields a nice log of all the requests:

Request started: "GET" http://localhost:8099/
Request ended: http://localhost:8099/index.html with HTTP status 304.0
Request started: "GET" http://localhost:8099/scripts/angular.js
Request started: "GET" http://localhost:8099/styles/styles.css
Request started: "GET" http://localhost:8099/scripts/angular-route.js
Request started: "GET" http://localhost:8099/app/app.js
Request ended: http://localhost:8099/scripts/angular-route.js with HTTP status 304.0
Request started: "GET" http://localhost:8099/app/controllers/ordersController.js
Request ended: http://localhost:8099/scripts/angular.js with HTTP status 304.0
Request ended: http://localhost:8099/styles/styles.css with HTTP status 304.0
Request started: "GET" http://localhost:8099/app/controllers/customersController.js
Request ended: http://localhost:8099/app/app.js with HTTP status 304.0
Request ended: http://localhost:8099/app/controllers/ordersController.js with HTTP status 304.0
Request ended: http://localhost:8099/app/controllers/customersController.js with HTTP status 304.0
Request started: "GET" http://localhost:8099/app/views/customers.html
Request ended: http://localhost:8099/app/views/customers.html with HTTP status 304.0
Request started: "GET" http://localhost:8099/favicon.ico
Request ended: http://localhost:8099/favicon.ico with HTTP status 404.0

To stop the web site, click on the notification area icon for IISEXPRESS, and choose 'Exit' from the menu

Blog ID: 2014 10-27_Blog_6157