Skip to content

Instantly share code, notes, and snippets.

@levent
Forked from paulbellamy/localserver
Created March 22, 2013 14:46
Show Gist options
  • Save levent/5221810 to your computer and use it in GitHub Desktop.
Save levent/5221810 to your computer and use it in GitHub Desktop.
#!/bin/bash
host=`facter fqdn`
if [[ ! -n "$1" ]]; then
port=8000
else
port=$1
fi
echo "http://$host:$port"
python -m SimpleHTTPServer $port
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment