Jeff Lembeck learns a code or two

Serious code business!

Quick Servers in Different Languages

So, I've mentioned simplehttpserver before here, a quick rack script that will allow you to start up a server in your current directory, but there is a way better way in Ruby.

ruby -run -e httpd . -p 9090

If you're a fan of things like dotfiles, check this out: https://github.com/jlembeck/dotfiles/blob/master/.functions#L115

For PHP, you can run

php -S localhost:4000

or, something like this can be added to your dotfiles: https://github.com/jlembeck/dotfiles/blob/master/.functions#L108

Back to Blog