-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.js
More file actions
43 lines (36 loc) · 957 Bytes
/
config.js
File metadata and controls
43 lines (36 loc) · 957 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
38
39
40
41
42
43
const log4js = require("log4js");
log4js.configure({
appenders: {
development: {
type: "file",
filename: "log_file.log"
}
},
categories: {
default: {
appenders: ["development"],
level: "trace"
}
}
});
const dotenv = require("dotenv").config();
module.exports = Object.freeze({
// Logger configuration
LOGGER: log4js.getLogger("development"),
//Base url
BASE_URL: process.env.BASE_URL, // Base url of front-end(defined in .env file)
//Database URI
DATABASE: process.env.DATABASE,//Database URI(defined in .env file)
// HTTP Status Codes
OK_STATUS: 200,
BAD_REQUEST: 400,
UNAUTHORIZED: 401,
NOT_FOUND: 404,
MEDIA_ERROR_STATUS: 415,
VALIDATION_FAILURE_STATUS: 417,
DATABASE_ERROR_STATUS: 422,
INTERNAL_SERVER_ERROR: 500,
// Jwt token configuration
SECRET_KEY: "shukrana_mushkurana", //Secret key to be encrypt data
TOKEN_EXPIRED_TIME: "7d" // 7days of expired time
});