forked from micromata/http-fake-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.js
More file actions
38 lines (26 loc) · 666 Bytes
/
Copy pathconfig.js
File metadata and controls
38 lines (26 loc) · 666 Bytes
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
38
'use strict';
const Confidence = require('confidence');
require('dotenv').load();
const criteria = {
env: process.env.NODE_ENV
};
const config = {
$meta: 'General project wide config.',
projectName: 'http-fake-backend',
env: process.env.NODE_ENV,
apiUrlPrefix: process.env.API_PREFIX,
port: {
web: {
$filter: 'env',
test: process.env.TEST_PORT,
$default: process.env.SERVER_PORT
}
}
};
const store = new Confidence.Store(config);
exports.get = function (key) {
return store.get(key, criteria);
};
exports.meta = function (key) {
return store.meta(key, criteria);
};