Created
August 18, 2013 21:14
-
-
Save matejb/6264049 to your computer and use it in GitHub Desktop.
one line web server in bash
This file contains 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
Author: http://www.razvantudorica.com/08/web-server-in-one-line-of-bash/ | |
while true; do { echo -e 'HTTP/1.1 200 OK\r\n'; cat index.html; } | nc -l 8080; done | |
index.html can be any file you want to serve it. | |
You can access it after that as: http://host_ip:8080/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment