josi is a web framework for node.js.
Create a josi app and start the dev server:
$ josi hello $ cd hello $ josi run
A josi controller:
var actionresults = require('josi/actionresults'); var view = actionresults.view; var redirect = actionresults.redirect; this.index = function() { return view({ title: 'A Title', name: 'josi' }); }; this.redir = function() { return redirect('/product/details/1'); };
A josi view:
<h1><%= title %></h1> <p>Hello <%= name %></p>
There is a tutorial here.
You can download this project in either zip or tar formats.
You can also clone the project with Git by running:
$ git clone git://github.com/thatismatt/josi
josi aims to be easy to pick up for developers familiar with MVC web frameworks (e.g. ASP.NET MVC, Rails, Django etc). To this end a typical josi app would have:
As well as this, josi tries to make the things that are exciting about node.js, its asynchronous, event driven nature, easy to achieve. For an illustration see the Code Review example.
josi is heavily influenced by ASP.NET MVC, and to a lesser extent by Ruby on Rails and Django.