Lines Matching refs:routes
24 * routes/
32 `routes/index.js` uses `require-directory` to build the hash (rather than doing so manually) like s…
39 `app.js` references `routes/index.js` like any other module, but it now has a hash/tree of the expo…
42 var routes = require('./routes');
46 app.get('/', routes.home);
47 app.get('/register', routes.auth.register);
48 app.get('/login', routes.auth.login);
49 app.get('/logout', routes.auth.logout);
52 The `routes` variable above is the equivalent of this:
55 var routes = {
56 home: require('routes/home.js'),
58 login: require('routes/auth/login.js'),
59 logout: require('routes/auth/logout.js'),
60 register: require('routes/auth/register.js')
65 *Note that `routes.index` will be `undefined` as you would hope.*
76 For example, in the [example in the Usage section](#usage) we could have avoided creating `routes/i…
80 var routes = requireDirectory(module, './routes');