#websocket
1 messages · Page 1 of 1 (latest)
I believe so, but in the video that I watched the websocket in javascript, it didn't convert to a String, I tried to do that too, I used the toString() command in the message, but it continued with the same error
for me to send a message in my websocket I created an html and inside the console I put ws.send("hello")
I'm not sure if I'll be able to help personally but it'd make it more likely that somebody else can if you share your code and maybe a link to that tutorial
no problem, do you know anyone on this server who has more focus on javascript?
There are a lot of people. This time of day is just a bit quiet since most of EU are at work/school and US are just starting their day
understand
If you share your code I'm sure somebody will get to you as soon as they can 😊
const ws = require("ws")
const express = require("express")
const expressServer = express()
const wsServer = new ws.Server({
server: expressServer.listen(3000),
host: "localhost",
path: "/"
})
wsServer.on("connection", (w) => {
console.log("someone connected")
w.on("message", (msg) => {
console.log("got message: ", msg)
w.send(msg)
})
})
expressServer.listen(() => console.log("listening..."))