34 lines
1.3 KiB
JavaScript
34 lines
1.3 KiB
JavaScript
const env = process.env;
|
|
let host = env.DB_HOST || "192.168.1.56";
|
|
let port = env.DB_PORT || "27017";
|
|
let user = env.DB_USER || "lhdnapi";
|
|
let pass = env.DB_PASSWORD|| "kollect1234";
|
|
let dbname = env.DB_NAME|| "apisimulation";
|
|
|
|
module.exports = {
|
|
"port": 8080,
|
|
"jwt_secret": "654321",
|
|
"jwt_expiration_in_seconds": 6000,
|
|
"environment": "dev",
|
|
"permissionLevels": {
|
|
"NORMAL_USER": 3,
|
|
"ADMIN_USER": 2,
|
|
"SUPER_ADMIN": 1
|
|
},
|
|
"dbConfig":"mongodb://"+user+":"+pass+"@"+host+":"+port+"/"+dbname+"?authSource=admin&tls=false", // USE THIS FOR PRODUCTION
|
|
//"dbConfig":"mongodb://"+host+":"+port+"/"+dbname,
|
|
"dbOptions":{
|
|
useUnifiedTopology: true,
|
|
useNewUrlParser: true,
|
|
autoIndex: false, // Don't build indexes
|
|
reconnectTries: 30, // Retry up to 30 times
|
|
reconnectInterval: 500, // Reconnect every 500ms
|
|
poolSize: 10, // Maintain up to 10 socket connections
|
|
// If not connected, return errors immediately rather than waiting for reconnect
|
|
bufferMaxEntries: 0
|
|
}
|
|
|
|
|
|
};
|
|
//mongodb://lhdnapi:kollect1234@192.168.1.56/?authSource=admin&tls=false
|
|
//mongodb://lhdnapi:kollect1234@192.168.1.56/?authSource=admin&tls=false
|