-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
37 lines (33 loc) · 968 Bytes
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
'use strict';
require('dotenv').config();
var nconf = require('nconf');
nconf.env(['PORT', 'NODE_ENV'])
.argv({
'e': {
alias: 'NODE_ENV',
describe: 'Set production or development mode.',
demand: false,
default: 'development'
},
'p': {
alias: 'PORT',
describe: 'Port to run on.',
demand: false,
default: 5000
},
'n': {
alias: "neo4j",
describe: "Use local or remote neo4j instance",
demand: false,
default: "local"
}
})
.defaults({
'USERNAME': process.env.MOVIE_DATABASE_USERNAME,
'PASSWORD': process.env.MOVIE_DATABASE_PASSWORD,
'neo4j': 'local',
'neo4j-local': process.env.MOVIE_DATABASE_URL || 'bolt://localhost:7687',
'base_url': 'http://localhost:5000',
'api_path': '/api/v0'
});
module.exports = nconf;