Skip to content

Commit

Permalink
Use env-cmd to load .env files
Browse files Browse the repository at this point in the history
  • Loading branch information
arcatdmz committed May 19, 2019
1 parent 098dff8 commit 5dc24f0
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 9 deletions.
12 changes: 4 additions & 8 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/bin/bash

# Guide:
#
# 1. Copy this file to .env
Expand All @@ -8,11 +6,9 @@
#
# 2. Fill the blanks

export NODE_ENV=development
export PORT=9000
export ALLOW_HTTP=true
NODE_ENV=development
PORT=9000
ALLOW_HTTP=true

# Warning: PDF rendering does not work in Chrome when it is in headed mode.
export DEBUG_MODE=false

echo "Environment variables set!"
DEBUG_MODE=false
37 changes: 37 additions & 0 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"node": "10.x.x"
},
"scripts": {
"start": "nodemon --watch ./src -e js src/index.js",
"start": "env-cmd nodemon --watch ./src -e js src/index.js",
"test": "mocha --timeout 10000 && npm run lint",
"lint": "eslint ."
},
Expand Down Expand Up @@ -38,6 +38,7 @@
},
"devDependencies": {
"chai": "^4.1.2",
"env-cmd": "^9.0.1",
"eslint": "^4.8.0",
"eslint-config-airbnb-base": "^12.0.2",
"eslint-plugin-import": "^2.7.0",
Expand Down

0 comments on commit 5dc24f0

Please sign in to comment.