mirror of
https://github.com/esiur/esiur-js.git
synced 2025-06-27 07:13:12 +00:00
1.6.1
This commit is contained in:
@ -17,7 +17,7 @@ const WebSocket = require('ws');
|
||||
const http = require("http");
|
||||
const fs = require("fs");
|
||||
|
||||
const wss = new WebSocket.Server({port: 8081});
|
||||
const wss = new WebSocket.Server({port: 8001});
|
||||
|
||||
class MyMembership extends IMembership {
|
||||
userExists(username, domain) {
|
||||
@ -90,7 +90,7 @@ http.createServer(function (req, res) {
|
||||
res.end(data);
|
||||
}
|
||||
});
|
||||
}).listen(8080);
|
||||
}).listen(8000);
|
||||
|
||||
console.log(`HTTP Server running http://localhost:8080/demo/chat/index.html`);
|
||||
console.log(`IIP Server running iip://localhost:8081`);
|
||||
console.log(`HTTP Server running http://localhost:8000/demo/chat/index.html`);
|
||||
console.log(`IIP Server running iip://localhost:8001`);
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
try {
|
||||
status.innerHTML = "Connecting...";
|
||||
service = await wh.get("iip://localhost:8081/chat", {username, password: "1234"});
|
||||
service = await wh.get("iip://localhost:8001/chat", {username, password: "1234"});
|
||||
login.style.display = "none";
|
||||
service.on("message", appendMessage)
|
||||
.on(":title", updateTitle)
|
||||
@ -26,7 +26,7 @@
|
||||
service.users.forEach((x)=>appendUser(x, true));
|
||||
status.innerHTML = "Online";
|
||||
} catch (ex) {
|
||||
status.innerHTML = "Error " + ex.toString;
|
||||
status.innerHTML = "Error " + ex.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user