Node.js WebSocket Tutorial - Real-Time Chat Room using Multiple Clients

preview_player
Показать описание

🛠️ What You'll Learn:
Crafting a user-friendly interface with basic HTML and JavaScript to interact with WebSocket.
Techniques to effortlessly connect multiple users to the chat room, enabling seamless real-time communication.

📦 Technologies Covered:
- WebSocket (WS Package)
- HTML
- JavaScript

👍 Liked the video?
- Give it a thumbs-up 👍
- Share it with your network 🌐
- And don’t forget to SUBSCRIBE for more top-notch developer content! 🔔

🙏 Thanks for tuning in! See you in the next episode where we continue to make tech easy and accessible for everyone! ✌️

#JavaScript #WebSocket #RealTimeChat #Nodejs #WebSocketTutorial #JSWebSocket #WebSocketJavaScript #WebSocketServer #WebSocketClient #MultiUserChat #FullStackDevelopment #RealTimeApplications #JSWebSocketAPI #HTMLChatRoom #ConnectMultipleClients #WebSocketOnMessage #WebSocketSend #WebDevelopmentTutorial
Рекомендации по теме
Комментарии
Автор

Thank you for the tutorial, works well! I had to make one change though in server.js:
client.send(data.toString());
For me data was a Buffer and not a string, so I had to toString on data. Not sure if it's because I'm on firefox or if it's a different version of ws, or what.

michaelschurman
Автор

Neat, straight to the point. Thank you for sharing.

stephennwakasi
Автор

Hey mate, great tutorial. I just wanted to ask if you would advise moving the client-side stuff to a separate file for bigger projects and how you would organise that?

basileagle
Автор

Liked, subscribed, commented. Make more awesome tech tutorials

maheshm
Автор

can you make a video about a simple social app please! and thank you for the course it helped me a lot <3

abdallasaad
Автор

I tried it and I keep getting [object Blob] after sending the message?

CodyHoskin
Автор

Would there be any reason the server would hang and not display anything? Server says it's running in the console, but it's just loading when I go to localhost at the port. I've tried using different ports, I've tried copying and pasting the index.html and server.js files directly from the repo, and nothing.
I was able to get index.html to show up by using `const app = express();` and adding a get route (after app.listen instead of server.listen) with a res.sendFile to display the html, but of course since I was using app and not server, the line `const wss = new WebSocket.Server({ server }) didnt work, so when I tried to send something in the message box i got the 'No WebSocket Connection :(' message. Not sure what I'm missing. Any thoughts?

JChamberslam
Автор

for some reason when i text myself from different tab, i can see just [Object Blob] and nothing more. But my own text is normal. What could be the problem?

devastrapistdontsueme
Автор

I can't get yarn to work. I tried the standard npm start and following the instructions on yarn's website, but no luck. Guess I'll find a tutorial that doesn't use yarn

Tsukaiyo
Автор

truly the best tutorial helping me with my web dev module at uni
thanks mahn

shaydennaidoo
Автор

The best chatroom tutorial ive came across well done mate!

hughe
Автор

It's soothing to listen to you. Do not change a damn thing!

po-hsuanhuang
Автор

i get [object Blob] when i write message on other clients.

renisrrenis
Автор

on mine one shows text on web it shows object

werakidslojaonline
Автор

I believe I set everything correctly, but when I type something on one web, I get [object blob] on the other web. Do you know why this is?

BboyThingz
Автор

Hi everyone! I don't speak english so much but I wanted to asking about the line with three equals sign 11:00, in the video he used this syntax but I don't understand very good the why exactly, can anyone explain me please? Thank you! and great video. Pd: sorry for my english.

brayancantor
Автор

hey, what is your vscode theme that you are using? thank you

hugo_dev
Автор

Can you please make a same video with WEbrtc and was library? please

AnshumanBisoyi
Автор

I would like something similar. How would you add multi-room capability?

davidbarman
Автор

How to implement on live server(cpanel).We are faceing *No WebSocket connection error on live

MdZiaurRahman-piel