diff options
Diffstat (limited to 'serve.sh')
-rwxr-xr-x | serve.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/serve.sh b/serve.sh new file mode 100755 index 0000000..825b7cc --- /dev/null +++ b/serve.sh | |||
@@ -0,0 +1,15 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Starts a basic web server on the port specified. | ||
4 | # | ||
5 | # ./serve.sh 3000 -> http://localhost:3000 | ||
6 | # | ||
7 | # Copyright 2012 Eric Bidelman <ebidel@gmail.com> | ||
8 | |||
9 | port=$1 | ||
10 | if [ $# -ne 1 ] | ||
11 | then | ||
12 | port=8000 | ||
13 | fi | ||
14 | |||
15 | open http://localhost:$port && python -m SimpleHTTPServer $port; \ No newline at end of file | ||