Live data from Hacker News

Http-server, a simple zero-configuration command line http server

github.com

11–20 of 29 posts

Re: Http-server, a simple zero-configuration command line http server

#12

I built a simple zero-configuration FTP server that runs in a browser some time ago ( http://ezyftpserver.com/ ). Been wondering if I should do the same with a HTTP server?

Nice idea, jftr opera already offers an http server inside your browser, it is called unite, see http://en.wikipedia.org/wiki/Opera_(web_browser)#Opera_Unite

I just had a look at your page and it seems you used java for providing the ftp server. How do you handle devices behind firewalls/NAT?

Re: Http-server, a simple zero-configuration command line http server

#14
post #12

I built a simple zero-configuration FTP server that runs in a browser some time ago ( http://ezyftpserver.com/ ). Been wondering if I should do the same with a HTTP server?

Nice idea, jftr opera already offers an http server inside your browser, it is called unite, see http://en.wikipedia.org/wiki/Opera_(web_browser)#Opera_Unite I just had a look at your page and it seems you used java for providing the ftp server. How do you handle devices behind firewalls/NAT?

I don't. :-) It's Apache FTP server wrapped in an applet.

Re: Http-server, a simple zero-configuration command line http server

#15
Looks nice, I was looking for something similar the other day, easily sharing a directory over HTTP from command line. I ended up writing a couple of very simple bash functions that added/removed the current directory to ~/Sites (I'm on a Mac). Apache did the rest.

Re: Http-server, a simple zero-configuration command line http server

#16
post #5

Earlier quoted context omitted.

So is http-server supposed to be zero-configuration or configure-from-command-line server?

Both. It ships with sane defaults so you can type "http-server", but it also may optionally be configured with things like a path, a port, a host, etc.

You are both these id?

http://news.ycombinator.com/user?id=bitcoin

http://news.ycombinator.com/user?id=bitcoins

Re: Http-server, a simple zero-configuration command line http server

#17
post #10
post #3

Earlier quoted context omitted.

python -m SimpleHTTPServer cannot be configured from the command line. You'll need to write an additional py script to do anything useful. It's also missing a bunch of features you are going to want, like AutoIndex. It also cannot serve 6,000 requests per second out of the box.

I can think of use cases for wanting a quick simple, easy to configure http server. I can think of use cases for wanting to be able to serve >1,000 requests a second. I can't think of any that fall into both categories ... am I just lacking imagination?

once i wanted to serve a quick and dirty page of 200 thumbnails but python's HTTP server choked after a few people tried it concurrently. it's single threaded and just wouldn't hack it.

luckily if you have twisted installed, you can run "twistd web -n -p PORT --path ." it's just as easy as the basic HTTP server but way faster.

Re: Http-server, a simple zero-configuration command line http server

#18
post #16
post #5

Earlier quoted context omitted.

Both. It ships with sane defaults so you can type "http-server", but it also may optionally be configured with things like a path, a port, a host, etc.

You are both these id? http://news.ycombinator.com/user?id=bitcoin http://news.ycombinator.com/user?id=bitcoins

[deleted]

Re: Http-server, a simple zero-configuration command line http server

#20
post #16
post #5

Earlier quoted context omitted.

Both. It ships with sane defaults so you can type "http-server", but it also may optionally be configured with things like a path, a port, a host, etc.

You are both these id? http://news.ycombinator.com/user?id=bitcoin http://news.ycombinator.com/user?id=bitcoins

it's marak squires, he has lots of sock puppet accounts.
Post reply on HN