Skip to content

Commit 9222ae6

Browse files
authored
update dot env (#159)
1 parent 385c8b1 commit 9222ae6

File tree

3 files changed

+10
-16
lines changed

3 files changed

+10
-16
lines changed

package-lock.json

Lines changed: 8 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"cookie-parser": "^1.4.5",
5555
"debug": "^4.3.4",
5656
"dicer": "^0.3.0",
57-
"dotenv": "^8.2.0",
57+
"dotenv": "^16.4.0",
5858
"express": "^4.17.1",
5959
"forwarded-http": "^0.3.0",
6060
"har-validator": "^5.1.3",

server.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
11
const app = require("./src");
22
const dotenv = require("dotenv");
33

4-
const result = dotenv.config({ silent: false });
5-
if (result.error) {
6-
console.warn(`
7-
------------------------
8-
Missing env file:
9-
run this to fix it.
10-
cp .env.sample .env
11-
------------------------
12-
`);
13-
throw result.error;
14-
}
4+
dotenv.config();
155

166
const options = {
177
port: process.env.MOCKBIN_PORT,

0 commit comments

Comments
 (0)