advanced-instantiation.ejs
682 Bytes
var sequelize = new Sequelize('database', 'username', 'password', {
host: "my.server.tld",
port: 12345
})
// No need for password?
var sequelize = new Sequelize('database', 'username'[, null])
// Want no logging? Use that:
var sequelize = new Sequelize('database', 'username', 'password', {
disableLogging: true
})
// Since v0.4.3 you can disable the pluralization of table names:
var sequelize = new Sequelize('database', 'username', 'password', {
disableTableNameModification: true
})
sequelize.define('person', { /* ... */})
// will result in a table called >person< if that option is specified
// will result in a table called >people< if that option is not specified