2024-03-24 22:46:34 +04:00
|
|
|
import dotenv from "dotenv";
|
|
|
|
import { Sequelize } from "sequelize-typescript";
|
|
|
|
import Role from "./models/role.model";
|
2024-03-25 21:20:08 +04:00
|
|
|
import User from "./models/user.model";
|
2024-03-25 22:18:41 +04:00
|
|
|
import Section from "./models/section.model";
|
2024-03-26 13:35:03 +04:00
|
|
|
import Thread from "./models/thread.model";
|
2024-03-24 22:46:34 +04:00
|
|
|
|
|
|
|
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,
|
2024-03-26 13:35:03 +04:00
|
|
|
models: [Role, User, Section, Thread]
|
2024-03-25 22:18:41 +04:00
|
|
|
});
|