Skip to content

Instantly share code, notes, and snippets.

@robi42
Created December 11, 2010 12:17
Show Gist options
  • Save robi42/737344 to your computer and use it in GitHub Desktop.
Save robi42/737344 to your computer and use it in GitHub Desktop.
Run with, e.g.: `$ ringo -i app.js`
var {html5} = require('hiccup/page');
var {htmlResponse} = require('stick/helpers');
var text = 'Hello World!';
var markup = html5(['head', ['title', text]], ['body', ['h1', text]]);
var app = exports.app = require('stick').Application()
.configure('error', 'notfound', 'route')
.get('/', function (req) htmlResponse(markup));
if (require.main === module) {
require('stick/server').main(module.id);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment