aboutsummaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorHumairAK <humair88@hotmail.com>2016-07-22 21:42:38 +0000
committerHumairAK <humair88@hotmail.com>2016-07-22 21:42:38 +0000
commitfef388a0479b36c13ac286db65eadc756b5b197b (patch)
tree2791c0403a7c4aba919ec2f973c3d06c0ef8234b /app.js
parent90fe02430c828b0d99d5f60c3073c54278d85236 (diff)
moved admin route data into admin.js
Diffstat (limited to 'app.js')
-rw-r--r--app.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app.js b/app.js
index a96a932..9e96a9f 100644
--- a/app.js
+++ b/app.js
@@ -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);