-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.js
More file actions
80 lines (67 loc) · 1.51 KB
/
config.js
File metadata and controls
80 lines (67 loc) · 1.51 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
var Confidence = require('confidence');
var criteria = {
env: process.env.NODE_ENV
};
var config = {
$meta: 'The main Application config',
pkg: require('./package.json'),
server : {
port : '8069',
host : '0.0.0.0'
},
api: {
swagger: {
info: {
title: 'PROJECT-API',
description: 'The official API for the Project.',
},
basepath: 'http://project.local:8069',
apiVersion: require('./package.json').version,
authorizations: {
jwt: {
type: 'apiKey',
passAs: 'header',
keyname: 'Authorization'
}
}
}
},
security: {
saltWorkFactor: 10,
jwtSecret: '$2a$10$mthZnWCucwvrd42B2Iym6edtyHnvMs6k2BMBqjb.wCjdZ.6kCkYRy'
},
logging : {
opsInterval: 1000,
reporters: {
$filter: 'env',
test: [],
$default: [{
reporter: require('good-console'),
events: { log: '*', response: '*' }
}]
}
},
db: {
sequelize: {
name: process.env.LOCAL_DB_NAME,
user: process.env.LOCAL_DB_USER,
pass: process.env.LOCAL_DB_PASS,
port: 5432,
host: process.env.LOCAL_DB_HOST,
dialect: 'postgres',
logging: {
$filter: 'env',
test: false,
$default: console.log
},
models: 'server/models/**/*.js'
}
}
}
var store = new Confidence.Store(config);
exports.get = function (key) {
return store.get(key, criteria);
};
exports.meta = function (key) {
return store.meta(key, criteria);
};