Helma Logo
helma.orgwikiHelma NGJSGI
main list history
previous version  overview  next version

Version 2 by hannes on 12. November 2009, 13:41

[JSGI] is a JavaScript web connector protocol inspired by Ruby's Rack and Python's WSGI.

[jsgi]: http://jackjs.org/jsgi-spec.html

Helma NG supports JSGI 0.2. At its simplest, a Helma JSGI application consists of a single `config` module that exports the JSGI application as `app`.

    exports.app = function(env) {
        return {
            status: 200,
            headers: {"Content-Type": "text/plain"},
            body: ["Hello World!"]
        };
    }

Additionally, the config module may export an array of middleware [middleware] functions or modules as `middleware`.

A very basic JSGI application is included with Helma NG in the [apps/jsgi directory](http://github.com/hns/helma-ng/blob/master/apps/jsgi/).


     removed
     added