|
|
|
|
|
by pyre
4320 days ago
|
|
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). |
|
<script src="app.js"></script> Should work in all browsers, at least on windows. It just looks for app.js relative to the root html file.