Browse Source

Move web socket url to config.js

pull/54/head
Amir Sanni 5 years ago
parent
commit
7973f4cfd4
  1. 9
      js/comm.js
  2. 3
      js/config.js

9
js/comm.js

@ -22,14 +22,9 @@ var mediaRecorder = null; @@ -22,14 +22,9 @@ var mediaRecorder = null;
const room = getRoom();
window.addEventListener('load', function(){
if(location.protocol === 'http:'){
wsChat = new WebSocket("ws://localhost:8080/comm");
}
else{
wsChat = new WebSocket("wss://localhost:8080/comm");
}
wsChat = new WebSocket(`${wsUrl}/comm`);
/*
********************************************************************************************************************************

3
js/config.js

@ -6,4 +6,5 @@ @@ -6,4 +6,5 @@
'use strict';
const appRoot = 'http://localhost:8888/';
const appRoot = 'http://localhost:8888/';
const wsUrl = 'ws://localhost:8080';//use wss://localhost:8080/comm for secured connection
Loading…
Cancel
Save