News for hackers. Stuff that matters.
Re:Ace - Sinatra for Node with Fibers by furtivefelon on Tuesday February 14, 2012 @07:04PM (#3592379)
this works for me:

include it in routes/index.js, and everything in your routes dir will be exposed if you do var routes = require('./routes')

var files = fs.readdirSync('./routes') files.forEach(function(file){ if(file != 'index.js'){ var exp = require('./'+file); _.extend(exports, exp); } });

There are no comments on this comment yet.