Skip to content

Commit fe279d4

Browse files
committed
Enable the use of .env file for COMPOSE_URI
1 parent 4c96a7f commit fe279d4

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#COMPOSE_URI=mongodb://example:[email protected]:27017/graph
2+
COMPOSE_URI=mongodb://localhost:27017/graph

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ bower_components/
22
node_modules/
33
.DS_Store
44
*.log
5+
.env

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"dependencies": {
55
"body-parser": "^1.13.1",
66
"bower": "^1.4.1",
7+
"dotenv": "^5.0.1",
78
"express": "^3.4.7",
89
"extend": "^3.0.0",
910
"mongoose": "^4.1.2",

server.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require("dotenv").config();
2+
13

24
var express = require('express'),
35
mongoose = require('mongoose'),

0 commit comments

Comments
 (0)