Skip to content

Commit

Permalink
Fixes petrarchy#9 express-session deprecated warning when starting th…
Browse files Browse the repository at this point in the history
…e server
  • Loading branch information
dennismphil committed Feb 21, 2017
1 parent f2ddc0a commit c49e87e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"server": "cross-env NODE_ENV=development babel-node server/index",
"start": "npm run server",
"test:watch": "mocha --reporter=min --compilers js:./test/jsdom_setup.js,js:babel-core/register,js:babel-polyfill,js:./test/sass_compiler.js --recursive -w",
"test": "mocha --compilers js:./test/jsdom_setup.js,js:babel-core/register,js:babel-polyfill,js:./test/sass_compiler.js --recursive"
"test": "mocha --compilers js:./test/jsdom_setup.js,js:babel-core/register,js:babel-polyfill,js:./test/sass_compiler.js --recursive",
"validate": "npm ls"
},
"author": "petrarchy",
"precommit": [
Expand Down Expand Up @@ -47,7 +48,7 @@
"eslint-plugin-react": "^6.7.1",
"express": "^4.14.0",
"express-graphql": "^0.6.1",
"express-session": "^1.14.2",
"express-session": "^1.15.1",
"extract-text-webpack-plugin": "^1.0.1",
"graphql": "^0.8.2",
"html-webpack-plugin": "^2.24.1",
Expand All @@ -58,6 +59,7 @@
"morgan": "^1.7.0",
"node-sass": "^3.12.4",
"postcss-loader": "^1.1.1",
"precommit-hook": "^3.0.0",
"react": "^15.4.0",
"react-addons-test-utils": "^15.4.1",
"react-css-themr": "^1.6.0",
Expand All @@ -74,5 +76,10 @@
"webpack": "^1.13.3",
"webpack-dev-middleware": "^1.8.4",
"webpack-hot-middleware": "^2.13.2"
}
},
"pre-commit": [
"lint",
"validate",
"test"
]
}
6 changes: 4 additions & 2 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ app.use(session({
secret: 'secretkey',
cookie: {maxAge: 10 * 60 * 1000},
resave: false,
saveUninitalized: false,
saveUninitialized: false
}));

// GraphQL endpoint
Expand All @@ -57,4 +57,6 @@ app.post('/login', function (req, res) {
res.send('login successful');
});

const server = app.listen(PORT, () => { console.log(`Demo server listening on port ${server.address().port}`); });
const server = app.listen(PORT, () => {
console.log(`Demo server listening on port ${server.address().port}`);
});

0 comments on commit c49e87e

Please sign in to comment.