Skip to content

Instantly share code, notes, and snippets.

@ag4ve
Created September 9, 2012 00:48
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 ag4ve/3681689 to your computer and use it in GitHub Desktop.
Save ag4ve/3681689 to your computer and use it in GitHub Desktop.
flatiron.js
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);
var routes = {
'/test': {
get: { "hello": "world" }
}
}
module.exports = routes;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment