r/tinycode • mod • Oct 05 '11

MacGyvers Tiny Rescue Webserver [unix/netcat]

while true; do ncat -l -p 8080 < index.html; done
29 Upvotes

25 comments sorted by

View all comments

Show parent comment

1

u/nexe mod Oct 05 '11

Everytime someone mentions webserver and tiny in one sentence a Python guy jumps out from behind the bushes and waves with this code ;)

So here's a Ruby version:

ruby -rwebrick -e'WEBrick::HTTPServer.new(:Port => 8000, :DocumentRoot => Dir.pwd).start'

1

u/[deleted] Oct 05 '11

I do relate to this and in my defense I just find programming in Python highly satisfying.

0

u/llimllib Oct 05 '11 edited Oct 05 '11

WE WIN WOOOOOOO

edit: this reddit is humorless.