aboutsummaryrefslogtreecommitdiff
path: root/serve.sh
blob: 825b7ccca97558e8eab5d2ac057d93f41b8f1e0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
#
# Starts a basic web server on the port specified.
# 
# ./serve.sh 3000 -> http://localhost:3000
#
# Copyright 2012 Eric Bidelman <ebidel@gmail.com>

port=$1
if [ $#  -ne  1 ]
then
  port=8000
fi

open http://localhost:$port && python -m SimpleHTTPServer $port;