diff options
| author | HumairAK <humair88@hotmail.com> | 2016-07-22 21:42:38 +0000 |
|---|---|---|
| committer | HumairAK <humair88@hotmail.com> | 2016-07-22 21:42:38 +0000 |
| commit | fef388a0479b36c13ac286db65eadc756b5b197b (patch) | |
| tree | 2791c0403a7c4aba919ec2f973c3d06c0ef8234b /app.js | |
| parent | 90fe02430c828b0d99d5f60c3073c54278d85236 (diff) | |
moved admin route data into admin.js
Diffstat (limited to 'app.js')
| -rw-r--r-- | app.js | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -13,6 +13,7 @@ var flash = require('connect-flash'); var routes = require('./routes/index'); var userRoutes = require('./routes/user'); +var adminRoutes = require('./routes/admin'); var app = express(); // Templating engine, we are using handlebars @@ -40,7 +41,6 @@ require('./config/passport'); // simply need to load it /*LOADS ALL STATIC FILES FROM THE DIRECTORY __dirname*/ app.use(express.static(__dirname)); - // Needed to style the header based on the whether the user is signed in or not // Gives errors for admin - need to figure out app.use(function(req, res, next) { @@ -50,6 +50,7 @@ app.use(function(req, res, next) { // Allows us to customize express routing // in a separate file. +app.use('/admin', adminRoutes); app.use('/user', userRoutes); app.use('/', routes); |
