Skip to content

Commit

Permalink
Add Nuve and Basic Example ports to licode config (lynckia#1454)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcague authored Sep 11, 2019
1 parent 9326e95 commit 1b0154c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
4 changes: 2 additions & 2 deletions extras/basic_example/basicServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ app.use((req, res, next) => {
cleanExampleRooms(() => {
getOrCreateRoom(defaultRoomName, undefined, undefined, (roomId) => {
defaultRoom = roomId;
app.listen(3001);
app.listen(config.basicExample.port || 3001);
const server = https.createServer(options, app);
console.log('BasicExample started');
server.listen(3004);
server.listen(config.basicExample.tlsPort || 3004);
});
});
7 changes: 6 additions & 1 deletion nuve/nuveAPI/nuve.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ const express = require('express');
const bodyParser = require('body-parser');
const rpc = require('./rpc/rpc');

// eslint-disable-next-line import/no-unresolved
const config = require('./../../licode_config');

const app = express();

rpc.connect();
Expand Down Expand Up @@ -78,4 +81,6 @@ app.use((req, res) => {
res.status(404).send('Resource not found');
});

app.listen(3000);
const nuvePort = config.nuve.port || 3000;

app.listen(nuvePort);
12 changes: 12 additions & 0 deletions scripts/licode_default.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ config.nuve.superserviceKey = '_auto_generated_KEY_'; // default value: ''
config.nuve.testErizoController = 'localhost:8080'; // default value: 'localhost:8080'
// Nuve Cloud Handler policies are in nuve/nuveAPI/ch_policies/ folder
config.nuve.cloudHandlerPolicy = 'default_policy.js'; // default value: 'default_policy.js'
config.nuve.port = 3000; // default value: 3000


/*********************************************************
Expand Down Expand Up @@ -191,13 +192,24 @@ config.erizo.useNicer = false; // default value: false

config.erizo.disabledHandlers = []; // there are no handlers disabled by default

/*********************************************************
ROV CONFIGURATION
**********************************************************/
config.rov = {};
// The stats gathering period in ms
config.rov.statsPeriod = 20000;
// The port to expose the stats to prometheus
config.rov.serverPort = 3005;
// A prefix for the prometheus stats
config.rov.statsPrefix = "licode_";

/*********************************************************
BASIC EXAMPLE CONFIGURATION
**********************************************************/
config.basicExample = {};
config.basicExample.port = 3001; // default value: 3001
config.basicExample.tlsPort = 3004; // default value: 3004

/***** END *****/
// Following lines are always needed.
var module = module || {};
Expand Down

0 comments on commit 1b0154c

Please sign in to comment.