public
Created

flatiron.js

  • Download Gist
app.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
var path = require('path'),
flatiron = require('flatiron'),
director = require('director'),
ecstatic = require('ecstatic'),
app = flatiron.app,
plugins = flatiron.plugins;
 
var routes = require('./lib/routes.js');
 
app.config.file({ file: path.join(__dirname, 'config', 'config.json') });
 
app.use(plugins.http);
app.router = routes;
 
app.use(plugins.ecstatic, {
root: __dirname,
autoIndex: true
} );
 
app.start(3000);
routes.js
JavaScript
1 2 3 4 5 6 7
var routes = {
'/test': {
get: { "hello": "world" }
}
}
 
module.exports = routes;

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.