Skip to content

Instantly share code, notes, and snippets.

@lexer
Created April 8, 2011 17:01
Show Gist options
  • Save lexer/910278 to your computer and use it in GitHub Desktop.
Save lexer/910278 to your computer and use it in GitHub Desktop.
// Bootstrap routes
fs.readdir(__dirname + '/routes', function(err, files){
if (err) throw err;
files.forEach(function(file){
require('./routes/' + file.replace('.js',''))(app);
});
});
module.exports = function(app){
app.get('/users', function(req, res){
res.send('Hello users!');
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment