Skip to content

Commit

Permalink
Added dotenv support for config
Browse files Browse the repository at this point in the history
  • Loading branch information
ziggy-cyb committed Oct 23, 2023
1 parent 9b7586f commit b7b6565
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions api/config/default.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
const dotEnv = require("dotenv");

if (process.env.NODE_ENV !== "test") {
dotEnv.config({ path: ".env" });
}

module.exports = {
port: "9000",
env: "development"
}
port: "9000",
env: "development",
};

0 comments on commit b7b6565

Please sign in to comment.