Skip to content

Instantly share code, notes, and snippets.

@framlin
Created March 11, 2012 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save framlin/2016175 to your computer and use it in GitHub Desktop.
Save framlin/2016175 to your computer and use it in GitHub Desktop.
var union = require('union');
var flatiron = require('flatiron');
//var ecstatic = require('ecstatic');
app = new flatiron.App();
app.use(flatiron.plugins.http);
app.router.get('/action', function () {
this.res.writeHead(200, { 'Content-Type': 'text/plain' });
this.res.end('Hello world!\n');
});
app.http.before.push(require('ecstatic')(__dirname + '/../_attachments'));
app.start(8080);
console.log('Listening on :8080');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment