Skip to content

Commit

Permalink
No need to manually edit IP address
Browse files Browse the repository at this point in the history
  • Loading branch information
GDeKatt committed Jul 13, 2019
1 parent 8650e59 commit a4cb071
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
13 changes: 4 additions & 9 deletions README.NOW
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@

where xxx... is the IP address of the system where this server is to be run.


2. Edit the `/public/index.html` file in this package, find the line below and change `192.168.0.11` to the same IP address above.

this._socket = new WebSocket("ws://192.168.0.11:3010/client"); // +

3. `node.js` and `npm` must be installed on the system where this server is to be run.
4. From within this directory, run `npm install` to download required modules
5. Launch the server with `node index.js`
6. From a web browser, connect to the interface at:
2. `node.js` and `npm` must be installed on the system where this server is to be run.
3. From within this directory, run `npm install` to download required modules
4. Launch the server with `node index.js`
5. From a web browser, connect to the interface at:

http://xxx.xxx.xxx.xxx:3010

Expand Down
6 changes: 5 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,12 @@
<script>
function socketConnect(messageCallback){
if (!this._socket) {
var protocol = "ws:";
if (window.location.protocol === "https:") {
protocol = "wss:";
}

this._socket = new WebSocket("ws://192.168.0.11:3010/client"); // + startUp.backend_server); // 'wss://openmhz.com/');
this._socket = new WebSocket(protocol + "//" + window.location.host +"/client");
if (typeof messageCallback === "function") {

this._socket.onmessage = messageCallback.bind(this);
Expand Down

0 comments on commit a4cb071

Please sign in to comment.