forked from ossystem/internal-digital-signature-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigs.js
54 lines (44 loc) · 914 Bytes
/
configs.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
const {
ENVIRONMENT: {DEV, PROD},
NEED_TO_WRITE_INTO_FILE,
} = require('./lib/constants');
const {
DEBUG = 'app',
NODE_ENV = PROD
} = process.env;
if (!NODE_ENV || ![DEV, PROD].includes(NODE_ENV)) {
process.env.NODE_ENV = PROD;
}
process.env.DEBUG = DEBUG;
module.exports = {
isDevelopment: NODE_ENV === DEV,
server: {
host: '127.0.0.1',
port: 3000,
usessl:false,
key:"key.pem",
cert:"cert.pem",
passphrase:"qwe123"
},
middlewares: {
corsConfigs: { // https://www.npmjs.com/package/cors
allowedOrigin: '*',
allowedMethods: [
'GET',
'POST',
'OPTIONS'
],
allowedHeaders: [
'Accept',
'Content-Type',
'Origin',
'X-Requested-With'
]
}
},
signingSettings: {
keyFileName: 'key-6.dat',
keyPassword: "tect3",
certificateFileName: 's2.cer'
}
};