first commit
This commit is contained in:
18
dockers/quotas/html/express_webapp/database.js
Normal file
18
dockers/quotas/html/express_webapp/database.js
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
// Creating new Object of Sequelize
|
||||
const sequelize = new Sequelize(
|
||||
process.env.MYSQL_DATABASE,
|
||||
process.env.MYSQL_USER,
|
||||
process.env.MYSQL_PASSWORD, {
|
||||
// Explicitly specifying
|
||||
// mysql database
|
||||
dialect: 'mariadb',
|
||||
// By default host is 'localhost'
|
||||
host: 'db'
|
||||
}
|
||||
);
|
||||
|
||||
// Exporting the sequelize object.
|
||||
// We can use it in another file
|
||||
// for creating models
|
||||
module.exports = sequelize
|
Reference in New Issue
Block a user