Sunday, December 16, 2012

Sssmoke - When even Sinatra is too much

Sometimes you don't need a web framework, no matter how light - you just want to slap a Ruby script or two on a web server. Enter Sssmoke:
gem install sssmoke

Put your erb templates in a directory, then run them in a web server by typing:
sssmoke

A template named foo.erb will get the URL http://localhost:8888/foo.

Advanced options for powah usahs:
sssmoke directory_name      # sssmoke templates from another directory
sssmoke template_name.erb   # sssmoke a single template at http://localhost:8888/

That's all. (As to the reason why it's called "Sssmoke"- that story would be better told in person.)