-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
37 lines (31 loc) · 1.01 KB
/
config.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
const MongoStore = require("connect-mongo");
const mongoURI = process.env.MONGO_DB;
const secretString = "apple_orange_lemon";
const defaultProfilePicture = {
url: "https://res.cloudinary.com/de7j5tens/image/upload/v1658582156/aqyndar-images/jack-dong-yJozLVBxNA0-unsplash_goqmha.jpg",
filename: "aqyndar-images/jack-dong-yJozLVBxNA0-unsplash_goqmha.jpg",
};
const defaultAuthorProfilePicture = {
url: "https://res.cloudinary.com/de7j5tens/image/upload/v1658584534/aqyndar-images/louis-hansel-MardkT836BU-unsplash_rakjde.jpg",
filename: "aqyndar-images/louis-hansel-MardkT836BU-unsplash_rakjde.jpg",
};
const saltRounds = 10;
const sessionConfig = {
secret: secretString,
resave: false,
saveUninitialized: false,
cookie: {
maxAge: 1000 * 60 * 60 * 24 * 30 // 30 days
},
store: MongoStore.create({
mongoUrl: mongoURI
}),
};
module.exports = {
mongoURI,
secretString,
defaultProfilePicture,
defaultAuthorProfilePicture,
saltRounds,
sessionConfig,
}