I programmed in Ruby and Rails for quite a long time, and then I fell in love with the simplicity of the Sinatra framework which allowed me to build one page web applications.
Is there a web framework like Sinatra available for Erlang? I tried Erlyweb but it seems far too heavyweight.
You might be interested in Rusty Klophaus' nitrogen framework. It's really lightweight and is ideal for really dynamic single page sites.
Have a look at webmachine. It has a very simple but powerful dispatch mechanism. You simply have to write a resource module, point your URIs to it and your service is automatically HTTP compliant.
You could achieve something minimal with mochiweb:
If you need advanced routing, you will have to use regex's instead of a simple case statement.
You may want to take a look at Axiom (disclosure: it's my own project). It is largely inspired by Sinatra, built on top of Cowboy and offers a lot of the features, Sinatra does.
A simple example:
This handles
GET /hi
and returnsHello World!
.Take a look at the README for a documentation of it's features.
May be this example (see REST SUPPORT) using misultin, looks like sinatra :