Micro

Micro.js is a micro webapp framework along the same lines as Sinatra, running on top of Proton.js, and hence JSGI (using jsgi-node) and Node.js (although there is no reason it couldn't be made to work in other CommonJS environments).

Installing

NPM is recommended for development, although for production you might want to find/build a package for your operating system:

npm install micro

A Basic Web App

The following web app returns the text "hello, world!":

var WebApp = exports.WebApp = micro.webapp(),
    get    = WebApp.get;
    
get('/', function (request, response) {
    response.ok('text/html');
    return 'hello, world!';
});

To run the web app, create a directory and save the code above into a file called lib/webapp.js under your new directory. From within the directory run:

proton

Your new web app should be available at http://localhost:8000/.

Documentation