Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit 24eec29

Browse files
committed
Sane configurations - no magic
DON'T automagically create local.json Remove redundancy in config/
1 parent 6cc2d39 commit 24eec29

File tree

5 files changed

+11
-50
lines changed

5 files changed

+11
-50
lines changed

config/cucumber.json

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
{
2-
"host": "localhost",
3-
"port": 3030,
4-
"baseURL": "http://localhost:3030",
5-
"frontURL": "http://localhost:3000",
6-
"smtpConfig": {
7-
"host": "0.0.0.0",
8-
"port": 1025,
9-
"ignoreTLS": true
10-
},
11-
"thumbor": {
12-
"url": "",
13-
"key": ""
14-
},
15-
"seeder": {
16-
"runOnInit": false,
17-
"dropDatabase": false
18-
},
19-
"defaultEmail": "[email protected]"
2+
"port": 3031,
3+
"baseURL": "http://localhost:3031",
4+
"mongodb": "mongodb://localhost:27017/hc_api_test"
205
}

config/default.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,13 @@
1717
"apiSecret": "TE9TqAk2xK[9EFJL",
1818
"sentry": {},
1919
"seeder": {
20-
"runOnInit": true,
21-
"dropDatabase": true
20+
"runOnInit": false,
21+
"dropDatabase": false
22+
},
23+
"smtpConfig": {
24+
"host": "0.0.0.0",
25+
"port": 1025,
26+
"ignoreTLS": true
2227
},
2328
"mongodb": "mongodb://localhost:27017/hc_api",
2429
"authentication": {

config/local.example.json

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
{
2-
"host": "localhost",
3-
"port": 3030,
4-
"baseURL": "http://localhost:3030",
5-
"frontURL": "http://localhost:3000",
6-
"smtpConfig": {
7-
"host": "0.0.0.0",
8-
"port": 1025,
9-
"ignoreTLS": true
10-
},
11-
"thumbor": {
12-
"url": "",
13-
"key": ""
14-
},
152
"seeder": {
163
"runOnInit": true,
174
"dropDatabase": false
18-
},
19-
"defaultEmail": "[email protected]"
5+
}
206
}

config/test.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
{
22
"port": 3031,
33
"baseURL": "http://localhost:3031",
4-
"seeder": {
5-
"runOnInit": false,
6-
"dropDatabase": false
7-
},
8-
"smtpConfig": {
9-
"host": "0.0.0.0",
10-
"port": 1025,
11-
"ignoreTLS": true
12-
},
134
"mongodb": "mongodb://localhost:27017/hc_api_test"
145
}

server/index.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
const fs = require('fs-extra');
33
const path = require('path');
44

5-
// setup local env is not available
6-
let configDir = path.resolve('config');
7-
if (process.env.NODE_ENV !== 'production' && !fs.existsSync(configDir + '/local.json')) {
8-
fs.copySync(configDir + '/local.example.json', configDir + '/local.json');
9-
}
10-
115
const app = require('./app');
126
const port = app.get('port');
137
const host = app.get('host');

0 commit comments

Comments
 (0)