Closed lithiumjs closed 6 years ago
You can use the official client's API to connect:
MPP.client.uri = "ws://localhost:1234";
MPP.client.ws.close();
But what if I want to host the client publicly?
Then you need to copy the client, and host those files using a separate http server. Here's a recent client from MPP: http://ourworldofpixels.com/piano/mpp-client-2017-12-03.zip
If you are not hosting the piano server on the same address as the http server, or need to change the default port (8080), change it at script.js (line 1.100)
Thanks! Also, what do I use the password for?
The only use it has is to change a user's color with it, like this:
MPP.client.sendArray([{m: "adminmsg", password: "password_here", message: {m: "color", id: "user's id (not _id)", color: "#hexcolor"}}]);
Alright, I have downloaded, compiled and started the server. How do I connect to it?