on server: while true; nc -l $PORT $FILE
Quick, simple and easy to fire up. You can continue to hack on the file and nc will serve up the latest saved version.Web server in one line of bash
11–20 of 69 posts
Re: Web server in one line of bash
#12Re: Web server in one line of bash
#13Works even in an initramfs, and in some embedded systems. Serves up the current directory, and you can even have CGI scripts in cgi-bin.
Re: Web server in one line of bash
#14$ busybox httpd Works even in an initramfs, and in some embedded systems. Serves up the current directory, and you can even have CGI scripts in cgi-bin.
* Side note: if it is, make sure your router manufacturer provides the GPL source release.
Re: Web server in one line of bash
#15 twistd web --path . --port 8080Re: Web server in one line of bash
#16Neat trick, but probably too limited to be of much use. Also, stopping it is kind of a nuisance.
Re: Web server in one line of bash
#17netcat's cool, but the post could've gone a bit further. If it's an intro "how to do this", maybe explain the moving parts for beginners?
Re: Web server in one line of bash
#18 npm install -g serve
serveRe: Web server in one line of bash
#19$ busybox httpd Works even in an initramfs, and in some embedded systems. Serves up the current directory, and you can even have CGI scripts in cgi-bin.
Re: Web server in one line of bash
#20$ busybox httpd Works even in an initramfs, and in some embedded systems. Serves up the current directory, and you can even have CGI scripts in cgi-bin.
Woah, I didn't realize busybox had an httpd. Truly a sweet piece of software.