Skip to content

Commit

Permalink
Load environment variables from .env
Browse files Browse the repository at this point in the history
Useful for configuration development environment.
  • Loading branch information
bfirsh committed Apr 25, 2019
1 parent cda6ec1 commit 5578d51
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ tests/__image_snapshots__/__diff_output__
.cache
dist
.tmp
.env

/storybook-static

1 change: 1 addition & 0 deletions bin/engrafo
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env node
require("dotenv").config();
const converter = require("../src/converter");
const program = require("commander");

Expand Down
8 changes: 3 additions & 5 deletions bin/engrafo-server
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/usr/bin/env node

var server = require("../src/converter/server");
var path = require("path");
var fs = require("fs");
var program = require("commander");
require("dotenv").config();
const program = require("commander");
const server = require("../src/converter/server");

program
.version("0.0.1")
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
},
"dependencies": {
"aws-sdk": "^2.441.0",
"dotenv": "^7.0.0",
"express": "^4.16.4",
"fs-extra": "^7.0.0",
"include-media": "^1.4.9",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3866,6 +3866,11 @@ dotenv@^6.0.0, dotenv@^6.2.0:
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-6.2.0.tgz#941c0410535d942c8becf28d3f357dbd9d476064"
integrity sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==

dotenv@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-7.0.0.tgz#a2be3cd52736673206e8a85fb5210eea29628e7c"
integrity sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g==

duplexer2@~0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1"
Expand Down

0 comments on commit 5578d51

Please sign in to comment.