aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xserve.sh15
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
9port=$1
10if [ $# -ne 1 ]
11then
12 port=8000
13fi
14
15open http://localhost:$port && python -m SimpleHTTPServer $port; \ No newline at end of file