Include complete API and frontend sources for unified deployment
This commit is contained in:
1 parent
627b0ae60e
commit
d8fcae32b0
93 files changed
+53270
-3
No files matched your search
@@ -0,0 +1,35 @@
|
||||
import {} from 'dotenv/config';
|
||||
import { Sequelize } from 'sequelize';
|
||||
import User from './user.js';
|
||||
import Team from './team.js';
|
||||
import Case from './case.js';
|
||||
import Mark from './mark.js';
|
||||
import UserInCase from './userInCase.js';
|
||||
import TeamInCase from './teamInCase.js';
|
||||
|
||||
const { DB_NAME, DB_USER, DB_PWD, DB_HOST } = process.env;
|
||||
|
||||
export const models = {
|
||||
Case,
|
||||
Team,
|
||||
User,
|
||||
Mark,
|
||||
UserInCase,
|
||||
TeamInCase,
|
||||
};
|
||||
|
||||
export const sequelize = new Sequelize(DB_NAME, DB_USER, DB_PWD, {
|
||||
host: DB_HOST,
|
||||
dialect: 'mysql',
|
||||
dialectOptions: { multipleStatements: true },
|
||||
define: {
|
||||
charset: 'utf8mb4',
|
||||
collate: 'utf8mb4_unicode_ci',
|
||||
timestamps: true,
|
||||
underscored: true,
|
||||
paranoid: true,
|
||||
},
|
||||
logging: false,
|
||||
});
|
||||
|
||||
export default { sequelize, models };
|
||||
Reference in new issue
Block a user