import { Router } from 'express'
const cookieParser = require('cookie-parser')
const bodyParser = require('body-parser')
const session = require('express-session')
const router = Router()
const SequelizeStore = require('connect-session-sequelize')(session.Store)
const models = require('./../models/index')
router.use(bodyParser.json())
router.use(bodyParser.urlencoded({ extended: false }))
router.use(expressValidator())
router.use(cookieParser())
router.use(session({
secret: '545344353fgdgd,
resave: false,
saveUninitialized: true,
cookie: {
path: '/',
httpOnly: false,
maxAge: 24 * 60 * 60 * 1000
},
store: new SequelizeStore({
db: models.sequelize
})
}))
var vm = new Vue({
el: '#app',
...
render: h => h(MyComponent)
});