You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
angular-promises/slides/serve.sh

23 lines
364 B
Bash

#!/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
if [ $(uname -s) == "Darwin" ]
then
open=open
else
open=xdg-open
fi
$open http://localhost:$port/template.html && python -m SimpleHTTPServer $port;