Skip to content

Commit

Permalink
Merge pull request #2623 from nstuyvesant/master
Browse files Browse the repository at this point in the history
Replace express-sequelize-session with connect-session-sequelize
  • Loading branch information
Awk34 authored Aug 21, 2017
2 parents aafc1d8 + 8aec143 commit c7776cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion templates/app/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"connect-mongo": "^1.2.1",<% } %><% if(filters.sequelize) { %>
"sequelize": "^3.23.6",
"sqlite3": "~3.1.1",
"express-sequelize-session": "0.4.0",<% } %><% if(filters.auth) { %>
"connect-session-sequelize": "^4.1.0",<% } %><% if(filters.auth) { %>
"jsonwebtoken": "^7.0.0",
"express-jwt": "^5.0.0",
"passport": "~0.3.0",
Expand Down
5 changes: 2 additions & 3 deletions templates/app/server/config/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ import connectMongo from 'connect-mongo/es5';<% } %>
import mongoose from 'mongoose';
var MongoStore = connectMongo(session);<% } else if(filters.sequelize) { %>
import sqldb from '../sqldb';
import expressSequelizeSession from 'express-sequelize-session';
var Store = expressSequelizeSession(session.Store);<% } %>
let Store = require('connect-session-sequelize')(session.Store);<% } %>

export default function(app) {
var env = app.get('env');
Expand Down Expand Up @@ -65,7 +64,7 @@ export default function(app) {
mongooseConnection: mongoose.connection,
db: '<%= lodash.slugify(lodash.humanize(appname)) %>'
})<% } else if(filters.sequelize) { %>,
store: new Store(sqldb.sequelize)<% } %>
store: new Store({db: sqldb.sequelize})<% } %>
}));

/**
Expand Down

0 comments on commit c7776cb

Please sign in to comment.