Docs
🌐Websocket#
Example of a WS message for the backend :
const newSocket = new WebSocket("ws://localhost:8765");
const message = {
scripts: {
whatsmyname: {
value: "JohnDoe",
categories: "all",
},
}
}
newSocket.addEventListener("open", () => {
console.log("WebSocket opened");
newSocket.send(JSON.stringify(message));
});List of valid scripts options #valide-script
scripts cannot exceed 5 options
Error :
Invalid characters : String contains a space ( ).
String begins with a hyphen (-).
The string ends with a hyphen (-).
String contains one of the following characters: (/) or ( ).