Helma Logo
helma.orgwikiHelma NGJSGI
main list history

Version 4 by hannes on 12. November 2009, 20:25

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

Version 3 by hannes on 12. November 2009, 15:24

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

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

Version 1 by hannes on 16. October 2009, 15:41

1[JSGI] is a JavaScript web connector protocol inspired by Ruby's Rack and Python's WSGI.
2
3[jsgi]: http://jackjs.org/jsgi-spec.html
4
5Helma 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`.
6
7    exports.app = function(env) {
8        return {
9            status: 200,
10            headers: {"Content-Type": "text/plain"},
11            body: ["Hello World!"]
12        };
13    }
14
15Additionally, the config module may export an array of middleware functions or modules as `middleware`.
16
17A very basic JSGI application is included with Helma NG in the [apps/jsgi directory](http://github.com/hns/helma-ng/blob/master/apps/jsgi/).
18