Skip to content

Commit

Permalink
Fix basic example port (#1460)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcague authored Sep 20, 2019
1 parent 7fd6e07 commit df8bf3c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions extras/basic_example/basicServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,18 @@ app.use((req, res, next) => {
cleanExampleRooms(() => {
getOrCreateRoom(defaultRoomName, undefined, undefined, (roomId) => {
defaultRoom = roomId;
app.listen(config.basicExample.port || 3001);
let port = 3001;
let tlsPort = 3004;
if (config.basicExample && config.basicExample.port) {
port = config.basicExample.port;
}
if (config.basicExample && config.basicExample.tlsPort) {
tlsPort = config.basicExample.tlsPort;
}

app.listen(port);
const server = https.createServer(options, app);
console.log('BasicExample started');
server.listen(config.basicExample.tlsPort || 3004);
server.listen(tlsPort);
});
});

0 comments on commit df8bf3c

Please sign in to comment.