Need A Socket.io Server Just To Send Messages Between Clients Without Setting Up A Server 🧐? Use Our FREE Server Instead 🤑!
To Use Our Server Add The Following Line To Your HTML File:
<script src="https://msg-pass.up.railway.app/socket.io/socket.io.js"></script>
Now In A Separate JS File Add The Following Line:
const socket = io("wss://msg-pass.up.railway.app");
Now Every Event You Emit Will Be Forwarded To All Connected Clients, Example:
socket.emit("myEvent", data);
// 👇 That Broadcasts This To Everyone
socket.on("myEvent", data => {
// ...
}
);
// 🌏 You Can Also Listen To All Events
socket.onAny((eventName, data) => {
// ...
});
Note: Every Emitted Event Is Logged On Our Server DONT SEND SENSITIVE INFORMATION
Note2: Since This Project Is Hosted On Railway Free Tier There Might Be A Lot Of Down Time