Skip to content

Commit

Permalink
update dot env (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackkav authored Jan 24, 2024
1 parent 385c8b1 commit 9222ae6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
12 changes: 8 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"cookie-parser": "^1.4.5",
"debug": "^4.3.4",
"dicer": "^0.3.0",
"dotenv": "^8.2.0",
"dotenv": "^16.4.0",
"express": "^4.17.1",
"forwarded-http": "^0.3.0",
"har-validator": "^5.1.3",
Expand Down
12 changes: 1 addition & 11 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
const app = require("./src");
const dotenv = require("dotenv");

const result = dotenv.config({ silent: false });
if (result.error) {
console.warn(`
------------------------
Missing env file:
run this to fix it.
cp .env.sample .env
------------------------
`);
throw result.error;
}
dotenv.config();

const options = {
port: process.env.MOCKBIN_PORT,
Expand Down

0 comments on commit 9222ae6

Please sign in to comment.