-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.js
More file actions
61 lines (58 loc) · 1.66 KB
/
config.js
File metadata and controls
61 lines (58 loc) · 1.66 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
const convict = require('convict');
//const dotenv = require("dotenv");
const config = convict({
http: {
port: {
doc: 'The port to listen on',
default: 3000,
env: 'PORT'
}
},
authentication: {
google: {
clientId: {
doc: "The Client ID from Google to use for authentication",
default: "",
env: "GOOGLE_CLIENT_ID"
},
clientSecret: {
doc: "The Client Secret from Google to use for authentication",
default: "",
env: "GOOGLE_CLIENT_SECRET"
}
},
facebook: {
clientId: {
doc: "The Client ID from Facebook to use for authentication",
default: "",
env: "FACEBOOK_APP_ID"
},
clientSecret: {
doc: "The Client Secret from Facebook to use for authentication",
default: "",
env: "FACEBOOK_APP_SECRET"
}
},
token: {
secret: {
doc: 'The signing key for the JWT',
default: 'mySuperSecretKey',
env: "JWT_SIGNING_KEY"
},
issuer: {
doc: 'The issuer for the JWT',
default: 'telegram-bot'
},
audience: {
doc: 'The audience for the JWT',
default: 'telegram-bot'
},
expiry: {
doc: 'The expiry of the JWT',
default: '1 hour'
}
}
}
});
config.validate();
module.exports = config;