Skip to content

Instantly share code, notes, and snippets.

@johanfriis
Created May 19, 2013 13:42
Show Gist options
  • Save johanfriis/5607660 to your computer and use it in GitHub Desktop.
Save johanfriis/5607660 to your computer and use it in GitHub Desktop.
Command Line Servers #snippet
# requires php v5.4
php -Slocalhost:3000
# python 2
python -m SimpleHTTPServer 3000
# python 3
python -m http.server 3000
# python SMTP server
python -m smtpd -n -c DebuggingServer localhost:port
while true; do nc -l localhost 3000 < foo.html; done
# one shot version
nc -l localhost 3000 < foo.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment