-
Notifications
You must be signed in to change notification settings - Fork 1
Sequelize – Loading
Bartosz Łaniewski edited this page May 11, 2018
·
1 revision
import Database from "inra-server-sequelize";
const database = new Database({
host: process.env.DB_HOST,
port: Number(process.env.DB_PORT),
dialect: String(process.env.DB_DIALECT),
database: String(process.env.DB_DATABASE),
username: String(process.env.POSTGRES_USER),
password: String(process.env.POSTGRES_PASSWORD),
logging: console.log
});
try {
loadAll("./models", src => database.import(src));
} catch (error) {
// …
}
This Wiki and indvidual modules READMEs contains a lot of information – please take your time and read these instructions carefully.