format project
This commit is contained in:
parent
90d8e39eb3
commit
c02cf8c12e
39 changed files with 2062 additions and 909 deletions
|
|
@ -4,24 +4,27 @@ const dotenv = require('dotenv');
|
|||
dotenv.config();
|
||||
|
||||
const sequelize = new Sequelize({
|
||||
dialect: 'postgres',
|
||||
host: 'postgres',
|
||||
port: 5432,
|
||||
database: process.env.POSTGRES_DB,
|
||||
username: process.env.POSTGRES_USER,
|
||||
password: process.env.POSTGRES_PASSWORD,
|
||||
define: {
|
||||
timestamps: false,
|
||||
freezeTableName: true,
|
||||
underscored: true,
|
||||
quoteIdentifiers: false
|
||||
},
|
||||
dialect: 'postgres',
|
||||
host: 'postgres',
|
||||
port: 5432,
|
||||
database: process.env.POSTGRES_DB,
|
||||
username: process.env.POSTGRES_USER,
|
||||
password: process.env.POSTGRES_PASSWORD,
|
||||
define: {
|
||||
timestamps: false,
|
||||
freezeTableName: true,
|
||||
underscored: true,
|
||||
quoteIdentifiers: false,
|
||||
},
|
||||
});
|
||||
|
||||
sequelize.sync().then(() => {
|
||||
sequelize
|
||||
.sync()
|
||||
.then(() => {
|
||||
console.log('Database synced');
|
||||
}).catch(err => {
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('Error syncing the database:', err);
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = sequelize;
|
||||
module.exports = sequelize;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue