-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmanifest.js
More file actions
32 lines (27 loc) · 707 Bytes
/
manifest.js
File metadata and controls
32 lines (27 loc) · 707 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
var Confidence = require('confidence');
var AppConfig = require('./config');
var criteria = {
env: process.env.NODE_ENV
};
var manifest = {
$meta: 'The main server manifest',
server: {},
connections: [{
host: AppConfig.get('/server/host'),
port: AppConfig.get('/server/port')
}],
plugins: {
'good': AppConfig.get('/logging'),
'hapi-auth-jwt2': {},
'hapi-sequelized': AppConfig.get('/db/sequelize'),
'hapi-swagger': AppConfig.get('/api/swagger'),
'./server/api/hello': {}
}
};
var store = new Confidence.Store(manifest);
exports.get = function (key) {
return store.get(key, criteria);
};
exports.meta = function (key) {
return store.meta(key, criteria);
};