-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.js
More file actions
37 lines (35 loc) · 985 Bytes
/
config.js
File metadata and controls
37 lines (35 loc) · 985 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
function randomString(length) {
let result = '';
let characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!"§$%&/()=?*#';
for (var i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * characters.length));
}
return result;
}
export default {
oauth2: { // discord oauth keys
client_id: "",
client_secret: "",
redirect_uri: "http://localhost/login/callback",
scopes: ["identify"]
},
db: {
host: 'localhost',
user: 'root',
password: '',
database: 'hko'
},
session: {
secret: randomString(32), // can be random because important data is only stored on the server anyway
cookie: {
maxAge: 7 * 24 * 60 * 60 * 1000
},
resave: false,
saveUninitialized: false
},
server: { // https certificate
keyPath: "",
certPath: "",
passphrase: ""
}
};