Skip to content

Commit

Permalink
feat: add default env
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed Jan 27, 2022
1 parent 89ff22c commit eec3a25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.0.5",
"private": true,
"bin": "build/server.js",
"type": "module",
"engines": {
"node": ">=16.0.0"
},
Expand Down
3 changes: 2 additions & 1 deletion src/models/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ dotenv.config();
// possible values: local, test
export const sequelize = new Sequelize(config[process.env.NODE_ENV || 'local']);

const mirrorConfig = process.env.NODE_ENV === 'local' ? 'mirror' : 'mirrorTest';
const mirrorConfig =
(process.env.NODE_ENV || 'local') === 'local' ? 'mirror' : 'mirrorTest';
export const sequelizeMirror = new Sequelize(config[mirrorConfig]);

export const safeMirrorDbHandler = (callback) => {
Expand Down

0 comments on commit eec3a25

Please sign in to comment.