Created
December 11, 2010 12:17
-
-
Save robi42/737344 to your computer and use it in GitHub Desktop.
Run with, e.g.: `$ ringo -i app.js`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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