Created
May 19, 2013 13:42
-
-
Save johanfriis/5607660 to your computer and use it in GitHub Desktop.
Command Line Servers #snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# requires php v5.4 | |
php -Slocalhost:3000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# python 2 | |
python -m SimpleHTTPServer 3000 | |
# python 3 | |
python -m http.server 3000 | |
# python SMTP server | |
python -m smtpd -n -c DebuggingServer localhost:port |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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