Skip to content

Commit

Permalink
fix(config): use environment variables for config
Browse files Browse the repository at this point in the history
  • Loading branch information
kmsngh committed Jun 2, 2020
1 parent fd944d9 commit 5a381d4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .sequelizerc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const path = require('path');

module.exports = {
'config': path.resolve('config', 'config.json'),
'config': path.resolve('config', 'config.js'),
'models-path': path.resolve('src/database','models'),
'seeders-path': path.resolve('src/database','seeders'),
'migrations-path': path.resolve('src/database','migrations')
Expand Down
11 changes: 11 additions & 0 deletions config/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require("dotenv").config();
module.exports = {
development: {
username: process.env.DEVELOPMENT_USERNAME,
password: process.env.DEVELOPMENT_PASSWORD,
database: process.env.DEVELOPMENT_DATABASE,
host: process.env.DEVELOPMENT_HOST,
dialect: process.env.DIALECT,
operatorsAliases: false,
},
};
26 changes: 0 additions & 26 deletions config/config.json

This file was deleted.

0 comments on commit 5a381d4

Please sign in to comment.