Local dev on a javascript-heavy app is one use. You run your build tools to generate the static files (e.g. a Grunt build process with grunt-contrib-watch configured), and then you need a local web server to serve up the files. I tend to stick with:
python -m SimpleHTTPServer
though.
I actually setup a Tmuxinator session for such projects. It launches the static file server, the continuous build process, and a shell in the source directory.
Why not just run static files from disk? Most browsers refuse to execute JavaScript from file:/// Urls for security reasons (understandably).
I currently work with two apps that interact. One might generate a URL to the other. The base url is defined in a config file. I find it easier to just define 'localhost:PORT' for each app.
I actually setup a Tmuxinator session for such projects. It launches the static file server, the continuous build process, and a shell in the source directory.
Why not just run static files from disk? Most browsers refuse to execute JavaScript from file:/// Urls for security reasons (understandably).