diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index 574220e..c4f9605 100755 --- a/swarmlab-app/src/run/app.js +++ b/swarmlab-app/src/run/app.js @@ -4,6 +4,7 @@ var pathmodule = require('path'); var app = require('express')(); var http = require('http').Server(app); var https = require('https'); +var CONFIG = require('./runconfig.js'); const io = require("socket.io")(http, { // pingTimeout: 30000, // allowUpgrades: false, @@ -291,7 +292,7 @@ cors(corsOptions), (req, res, next) => { (async() => { -var mongourl = "mongodb://playgrounduser:efvvnuioervefSDFSGYGHRDFVsdfergvssppiiedifhwincvinviw_dbfjbsifbsdkjfswuunscfudfgbbfvibqefwrvnine@ondemand_playground_mongo1:27017,ondemand_playground_mongo2:27017,ondemand_playground_mongo3:27017,ondemand_playground_mongo4:27017,ondemand_playground_mongo5:27017,ondemand_playground_mongo6:27017,ondemand_playground_mongo7:27017/fluent?replicaSet=rs1" +var mongourl = "mongodb://"+CONFIG.mongo.user+":"+CONFIG.mongo.password+"@ondemand_playground_mongo1:27017,ondemand_playground_mongo2:27017,ondemand_playground_mongo3:27017,ondemand_playground_mongo4:27017,ondemand_playground_mongo5:27017,ondemand_playground_mongo6:27017,ondemand_playground_mongo7:27017/fluent?replicaSet=rs1" const OPTS = { useNewUrlParser: true, useUnifiedTopology: true diff --git a/swarmlab-app/src/run/runconfig.js b/swarmlab-app/src/run/runconfig.js new file mode 100644 index 0000000..7127463 --- /dev/null +++ b/swarmlab-app/src/run/runconfig.js @@ -0,0 +1,11 @@ +var config = {}; + +config.mongo = {}; +config.redis = {}; + +config.mongo.user = 'user' +config.mongo.password= 'pass' +config.redis.host = 'redisserver'; +config.redis.port = 6379; + +module.exports = config;