16 lines
429 B
TypeScript
16 lines
429 B
TypeScript
import dotenv from "dotenv";
|
|
import { Sequelize } from "sequelize-typescript";
|
|
import Role from "./models/role.model";
|
|
import User from "./models/user.model";
|
|
|
|
dotenv.config();
|
|
|
|
export const sequelize = new Sequelize({
|
|
database: process.env.DB_NAME,
|
|
dialect: "postgres",
|
|
username: process.env.DB_USER,
|
|
password: process.env.DB_PASSWORD,
|
|
host: process.env.DB_HOST,
|
|
port: process.env.DB_PORT,
|
|
models: [Role, User]
|
|
}); |