Skip to content

Instantly share code, notes, and snippets.

/app.js
Created Aug 26, 2012

Embed
What would you like to do?
Not working file server :P
var flatiron = require('flatiron'),
path = require('path'),
app = flatiron.app;
app.config.file({ file: path.join(__dirname, 'config', 'config.json') });
app.use(flatiron.plugins.http);
app.router.get('/', function () {
this.res.end("no")
});
app.router.get(/\/files.*\/?/, function (a) {
this.res.end(a)
});
app.start(80);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.