From b2a4eacc52f1186c55a98aba9b57c025652fda67 Mon Sep 17 00:00:00 2001 From: catarak Date: Thu, 9 Jun 2016 13:56:23 -0400 Subject: [PATCH] add dotenv, start to add signup --- server/controllers/user.controller.js | 1 + server/server.js | 13 ------------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/server/controllers/user.controller.js b/server/controllers/user.controller.js index c6de9d32..a8616652 100644 --- a/server/controllers/user.controller.js +++ b/server/controllers/user.controller.js @@ -9,6 +9,7 @@ export function newUser(req, res) { } export function createUser(req, res, next) { + console.log("in create user"); const user = new User({ username: req.body.username, email: req.body.email, diff --git a/server/server.js b/server/server.js index fdafb31f..0d7eccce 100644 --- a/server/server.js +++ b/server/server.js @@ -24,24 +24,11 @@ import serverConfig from './config'; import users from './routes/user.routes'; //Body parser, cookie parser, sessions, serve public assets -const MongoStore = require('connect-mongo')(session); app.use(Express.static(path.resolve(__dirname, '../static'))); app.use(bodyParser.urlencoded({extended: true})); app.use(bodyParser.json()); app.use(cookieParser()); -app.use(session({ - //this should be SECRET AND IN A SECRET FILE - //TODO add dotenv - secret: 'steve brule', - resave: true, - saveUninitialized: true, - store: new MongoStore({ - // url: process.env.MONGODB_URI || process.env.MONGOLAB_URI, - url: serverConfig.mongoURL, - autoReconnect: true - }) -})); app.use(passport.initialize()); app.use(passport.session()); app.use(Express.static(path.resolve(__dirname, '../static')));