Skip to content

Instantly share code, notes, and snippets.

@widged
Last active August 28, 2015 10:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save widged/92d3fc8023eace80be8f to your computer and use it in GitHub Desktop.
Save widged/92d3fc8023eace80be8f to your computer and use it in GitHub Desktop.
Instant server without command line

For when you get tired of having to open the command line to quickly check a javascript demo that requires the code to run over a server.

Save the file server.command on your machine, make it executable chmod u+x server.command, drop (with copy) the file in the demo folder, double click on it. Press the reload button on the browser window that automatically opened.

For the nodeserver, you must have http-server pre-installed (npm install -g http-server)

#!/bin/bash
cd "$(dirname "$0")"
open http://0.0.0.0:8080/
http-server
#!/bin/bash
cd "$(dirname "$0")"
open http://0.0.0.0:8000/
python -m SimpleHTTPServer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment