diff options
author | Eric Bidelman | 2012-04-06 14:18:42 -0700 |
---|---|---|
committer | Eric Bidelman | 2012-04-06 14:18:42 -0700 |
commit | de7412e5f6f208cb07519038d4537cf5fe467031 (patch) | |
tree | 5fcdd15f44c3e9edf39ed98e9de70966314b94d3 | |
parent | 06b4740ef7d0aecc01f325ca8c7d21679877c274 (diff) | |
download | io-slides-remote-de7412e5f6f208cb07519038d4537cf5fe467031.tar.gz |
serve script
-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 | ||