Created
June 5, 2017 21:22
-
-
Save snewell92/c1c2e96592a3ad0139b8f726ee394f3b to your computer and use it in GitHub Desktop.
Type error with sync
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Sequelize, ISequelizeConfig } from 'sequelize-typescript'; | |
let configOpts: ISequelizeConfig = { | |
name: 'hawtdb', | |
dialect: 'mysql', | |
username: 'hawtuser', | |
password: 'hawrtpassl3377', | |
host: 'localhost', | |
port: 3306, | |
pool: { | |
max: 1000, | |
min: 0, | |
idle: 5000 | |
}, | |
modelPaths: [__dirname + '/models/entities/'] | |
}; | |
const sequelize = new Sequelize(configOpts); | |
// establish singleton instance for application | |
app.set('sequelizeClient', sequelize); | |
// type error here | |
sequelize.sync({alter: true}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment