diff --git a/extras/basic_example/basicServer.js b/extras/basic_example/basicServer.js index a43e20a08d..19552392e5 100644 --- a/extras/basic_example/basicServer.js +++ b/extras/basic_example/basicServer.js @@ -13,9 +13,13 @@ const https = require('https'); // eslint-disable-next-line import/no-unresolved const config = require('./../../licode_config'); +config.erizoController.ssl_key = config.erizoController.ssl_key || '../../cert/key.pem'; +config.erizoController.ssl_cert = config.erizoController.ssl_cert || '../../cert/cert.pem'; +config.basicExample.nuveUrl = config.basicExample.nuveUrl || 'http://localhost:3000'; + const options = { - key: fs.readFileSync('../../cert/key.pem').toString(), - cert: fs.readFileSync('../../cert/cert.pem').toString(), + key: fs.readFileSync(config.erizoController.ssl_key).toString(), + cert: fs.readFileSync(config.erizoController.ssl_cert).toString(), }; if (config.erizoController.sslCaCerts) { @@ -50,7 +54,7 @@ app.use((req, res, next) => { // disable layout // app.set("view options", {layout: false}); -N.API.init(config.nuve.superserviceID, config.nuve.superserviceKey, 'http://localhost:3000/'); +N.API.init(config.nuve.superserviceID, config.nuve.superserviceKey, config.basicExample.nuveUrl); let defaultRoom; const defaultRoomName = 'basicExampleRoom'; diff --git a/scripts/licode_default.js b/scripts/licode_default.js index 0eeae94257..d32f857e7c 100644 --- a/scripts/licode_default.js +++ b/scripts/licode_default.js @@ -208,6 +208,7 @@ config.rov.statsPrefix = "licode_"; config.basicExample = {}; config.basicExample.port = 3001; // default value: 3001 config.basicExample.tlsPort = 3004; // default value: 3004 +config.basicExample.nuveUrl = 'http://localhost:3000/'; /***** END *****/ // Following lines are always needed.