Тёмный

Learn Socket.io In 30 Minutes 

Web Dev Simplified
Подписаться 1,6 млн
Просмотров 502 тыс.
50% 1

Опубликовано:

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 339   
@TigrexSC2
@TigrexSC2 3 года назад
Sincerely, you're born to teach. You have talent, you have taught me so many things and you explain them so nicely. Keep doing this, you're amazing af.
@thy-posh-dev
@thy-posh-dev 8 месяцев назад
@RanMC9918
@RanMC9918 3 месяца назад
@@thy-posh-dev
@seanfang398
@seanfang398 2 года назад
I really love Kyle's video style, always having so many concepts and infomation to be explained so clearly in such a few words, so briefly yet comprehensive
@bobdinitto
@bobdinitto Год назад
Kyle packs a lot of information into a small space. I sometimes have to watch the video multiple times to take it all in, but I'd much rather that than having to lumber through a long and tedious explanation. A few presenters have put me to sleep but Kyle never will.
@djameleddineMOUMEN
@djameleddineMOUMEN 2 года назад
The purpose of WebSockets isn't to make persistent connections that allow multiple requests. That could be achieved in HTTP through "keep-alive". The purpose of WebSockets is to make bidirectional connexions, in which the server can initiate the interaction with the client, in opposition to HTTP where the client is always the one initiating the interaction and the server only responds to the requests.
@upsxace
@upsxace Год назад
Amazing and accurate comment!
@lemon_maho
@lemon_maho Год назад
@@jmgomw7787 why are you even triggered???, he is clarifying something that kyle didn't mention, maybe stop being such a douchbag and learn something instead.
@S4skickers
@S4skickers Год назад
@@jmgomw7787 (?)
@ron.webdev
@ron.webdev 11 месяцев назад
@@jmgomw7787He clarified the concept. The least that you can do is be grateful. In the tech industry the difference between 0 and “0” is immensive.
@rubyc7771
@rubyc7771 6 месяцев назад
​@@jmgomw7787wtf!! Nothing wrong with sharing information, especially something valuable like this one. We learners appreciates it.
@synoi8780
@synoi8780 3 года назад
Perfect timing!
@leeeric6292
@leeeric6292 3 месяца назад
Need to adjust the speed@0.25X 04:25, swap to another terminal window; 04:35, run "npm start" in the clients side folder
@miguelbuising6391
@miguelbuising6391 3 года назад
this is so timely. Im currently creating a messaging app using react. thanks for this kyle!
@johnadriandodge
@johnadriandodge 3 года назад
Thank you Jedi Web Slayer
@ministersport
@ministersport 2 года назад
thanks so much man, it was really helpful
@anujtalwar
@anujtalwar 3 года назад
Loved the video! Could you please share the code's github link too? Thanks
@tonyndoss
@tonyndoss 3 месяца назад
liked and subscribed
@tdsora
@tdsora 3 года назад
what's a good strategy to load balance socketio servers and make sure people can broadcast to the correct socket?
@wildniscamper7276
@wildniscamper7276 5 месяцев назад
in which language is the gui (admin dashboard) written? is it html with java. i'm on my way to figure out the west way to have an rpi as a server to run a programm.. so far i think it is: a rpi with 2 programms 1webserver (socketio) 2application / timed by a scheduler.. the gui made in html and java and jss to comunicate to the rpi over wifi with every device in the network.. am i close to wjat i need or.....
@wildniscamper7276
@wildniscamper7276 5 месяцев назад
the best not west😂
@cloudprogramy7529
@cloudprogramy7529 3 года назад
The living God of coding 👍
@ravenbrotzmann1874
@ravenbrotzmann1874 3 года назад
could you please make a video how to integrate with the paypal api? and thanks for you great videos !
@rssbasdf
@rssbasdf 3 года назад
Great!!
@minchelanimations650
@minchelanimations650 2 года назад
Finally something that makes sense that isn’t 4 hours long
@ramdomzzzzz
@ramdomzzzzz 3 года назад
next face api js in node 😃
@HakunaMatata-it2qr
@HakunaMatata-it2qr 3 года назад
For me WDS logo is enough to like the video...!😇🌟
@aguynamedandre350
@aguynamedandre350 3 года назад
Thanks for reminding me to like the video!
@numpyasnum1768
@numpyasnum1768 2 года назад
Tbh
@abhijeetmukherjee48
@abhijeetmukherjee48 3 года назад
This guy is a legend💯
@mikechen1480
@mikechen1480 3 года назад
how can i get the set up code in 0:44 any link plz
@inoorbeats7632
@inoorbeats7632 10 месяцев назад
If "xhr poll error" still appears after setting admin socket ui like in the video then set credentials property to be true in the io server.
@mukkupretski
@mukkupretski 7 месяцев назад
This comment means that you add "credentials: true" to the object cors when creating the variable io. I also faced an error "invalid namespace", in order to fix that you just have to remove the "/admin" part from the end of the server URL (so it is just localhost:3000)
@BinaryMaestro1
@BinaryMaestro1 6 месяцев назад
could you update it please i've seen a lot of bugs while following the tutorial in my code (2024)
@br2716
@br2716 3 года назад
How do you always put out videos relevant to EXACTLY what I am looking for? Its scaring me Kyle!
@deependrasinghshekhawat2856
@deependrasinghshekhawat2856 2 года назад
Suggestion: As I have enjoyed your tutorials. You should try to slow down when you create tutorials on any topic, this might be holding your views back. Not everyone is that fluent in English.
@davidobodo3605
@davidobodo3605 2 года назад
Very nice video. Thanks a lot. But it would be really helpful if you add a link to the file in the description as well. Even if its not the finished code, at least the stater files so we can follow along. All the same thank you so much for this very informative video
@quintonpangyixuan3990
@quintonpangyixuan3990 2 года назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-XvQgcY2oZug.html i hope this helps you bro 🙏🏻
@gaganbedi4332
@gaganbedi4332 Год назад
just one suggestion. "Breathe......"
@nickvelos9571
@nickvelos9571 3 года назад
It's like you're reading my god damn mind. I can't thank you enough I was about to watch a 3 hour tutorial that covers what you cover in a more explanatory way. Thank you so so so much!. I just noticed that you don't include a repository for the video or at least the boiler plate code It'd be nice if you could add that.
@silentstone1
@silentstone1 3 года назад
Same here
@MiSt3300
@MiSt3300 3 года назад
incredilbe, same for me, I also just needed that tutorial so bad!
@Stoney_Eagle
@Stoney_Eagle 3 года назад
I just created my ffmpeg progress dashboard with sockets using Node, React and Material-UI. It works like the youtube upload thingy. But there are no uploads in this situation so the calculations are accurate. I'm watching the fruits of my labor on my second screen as I watch this video. So close to the release of my NoMercy TV project.
@ThiagoVieira91
@ThiagoVieira91 3 года назад
Kyle what is the repo for this project? To kickstart to practice coding along.
@Roronoa1062
@Roronoa1062 Год назад
Getting Error: xhr poll error and in console has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. while trying to get into admin dashboard....any help ??
@hassanshah5442
@hassanshah5442 3 года назад
can i get the starting code for this project
@mimosveta
@mimosveta 3 года назад
did you not share link to initial code? I'd like to follow along, but I don't feel like trying to figure out what you typed where before following along stated
@hekskey
@hekskey 3 года назад
What's the rule for when to use 'io' vs 'socket' on the server? I originally thought that 'socket' (specifically 'socket.on()') was used by both client and server to _handle_ an event but that when it came to _sending_ an event the client used 'socket.emit()' while the server used 'io.emit()'. That looks not to be the case, such as in the example of broadcasting where the server uses 'socket.broadcast.emit()'. So now I'm confused about when I should be using io/io.emit() on the server. And what about 'io.to()'? Is there a 'socket.to()' to be used on the server or would you just emit from the client with something like this... socket.emit('eventName', { receiver: '', msg: 'text' }); ...and then on the server run something like... socket.on('eventName', (data) => { io.to(data.receiverId).emit('otherEvent', data.msg); }); ...which is then received by that other client/socket with... socket.on('otherEvent', (msg) => { // do something with the msg }); Thanks for any clarity you can provide.
@prathamrajgor
@prathamrajgor 2 года назад
HIs crash course doesn't teach in depth just the things on the surface level. He does not explain things in depth and their working. F*cking Stupid. Half of teh things don't even work properly. Total Shit
@0.amonymous
@0.amonymous 10 месяцев назад
what
@syedalimehdi-english
@syedalimehdi-english 3 года назад
WDS the greatest channel on earth. I love the way you explain things. Its so easy to pick them up!
@keepingupwithdeba
@keepingupwithdeba 2 года назад
Helpful video, i was trying to import socket.io-client but it keeps getting an error failed to resolve module specifier ‘socket.io-client’, is there a way to solve this?
@jamesonvparker
@jamesonvparker 2 года назад
I'm getting this same issue. Did you find a fix?
@arvind6007
@arvind6007 3 года назад
Here he add cors which is work in socket 3.0 or above only..For below socket 3.0 u must use const io = require(socket.io){origins:[your_url]}
@fdctyler
@fdctyler 2 месяца назад
Hi Kyle, I really love your videos, you've been helping me a lot these past years. Is it possible to run a Socket server in Nextjs app router? If so, please make a video on how :) Thanks!
@yapayzeka
@yapayzeka 3 месяца назад
11:15 this way user can't be sure about connection. I would prefer incoming msg from server so I can be sure it's sent to everyone in channel including me. great presentation thank you.
@rosalyna_24
@rosalyna_24 3 года назад
how can i send a document using socket io
@UECSoumyaRay
@UECSoumyaRay 6 месяцев назад
Would have been helpful to follow along if there was a template for the starting boilerplate code. Nevermind. Did it myself. Great tutorial though.
@enriqueanzey7845
@enriqueanzey7845 Год назад
Outstanding bro, proud of ya.. , unlike the others they just copied someonelse codes and explain it with the official docs , too muc uh ah eh aswell, lol.
@PrestonRodrigues_24x7
@PrestonRodrigues_24x7 3 года назад
What error could this be? npm i @socket.io/admin-ui At line:1 char:7 + npm i @socket.io/admin-ui + ~~~~~~~ The splatting operator '@' cannot be used to reference variables in an expression. '@socket' can be used only as an argument to a command. To reference variables in an expression use '$socket'. + CategoryInfo : ParserError: (:) [], ParentConta insErrorRecordException + FullyQualifiedErrorId : SplattingNotPermitted
@PrestonRodrigues_24x7
@PrestonRodrigues_24x7 3 года назад
Found the solution... Hope it helps you... Use: npm i --% @socket.io/admin-ui --% (stop-parsing symbol)
@asimkoirala8074
@asimkoirala8074 2 года назад
@@PrestonRodrigues_24x7 thanks it works
@benghan
@benghan Год назад
on windows I used cmd instead of powershell for that to work :) hope it helps someone out there!
@georgekylo834
@georgekylo834 2 года назад
hey great video,for some reason tho i cant get socket io to be imported into the client js file so when i run it locally it says "Uncaught SyntaxError: Cannot use import statement outside a module".
@asimkoirala8074
@asimkoirala8074 2 года назад
You need to add either this attribute in the script tag or in the package.json file to get rid of that error:- { "type": "module" } Or That is because the import statement is introduced in the es6 version and by default all you js files are in text/javascript type. So, you can unlock that functionality with this.
@breezycodes
@breezycodes Год назад
@2:51 is very important. For the longest while I always thought that the socket connection died after each event. Good job Kyle 👏🏽
@karuneshkaimal
@karuneshkaimal 2 года назад
great tutorial , question from production deployment perspective will socket server will be an independent api gateway where the main app connects to ? If not what's the standard of deploying ?
@asimkoirala8074
@asimkoirala8074 2 года назад
When I reached on the client setup part and I imported io, I got an error like this: Uncaught TypeError: Failed to resolve module specifier "socket.io-client". Relative references must start with either "/", "./", or "../". How do I fix this?
@rufus9322
@rufus9322 2 года назад
I have the same problem, have you solved it?
@Felipekimst
@Felipekimst Год назад
why am I getting this error?? Uncaught TypeError: Failed to resolve module specifier "socket.io-client". Relative references must start with either "/", "./", or "../".
@ronniesunshine1163
@ronniesunshine1163 Год назад
He's using snowpack which takes care of the imports for him
@RezHimself
@RezHimself Год назад
how you use import statement without having babel ? doesn't work for me
@Ari-pq4db
@Ari-pq4db 3 месяца назад
You are the G.O.A.T Kyle, Thank you soooo much for this.
@gabrielntera5679
@gabrielntera5679 3 года назад
All ways great things, you deserve my sub
@torjohand.aleksandersen1297
@torjohand.aleksandersen1297 9 месяцев назад
what is all the files that are there before we import socket etc, could someone help me
@ktoscos4546
@ktoscos4546 8 месяцев назад
My resolution start learn only from this channel in order not to waste time.
@zithedev5220
@zithedev5220 10 месяцев назад
youre a fkng genius!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! thank you a LOT for this
@TheCodeAngle
@TheCodeAngle 3 года назад
Good presentation and delivery. Well done!
@prajwaltulawe6725
@prajwaltulawe6725 3 года назад
You saved my life brother.. 🙌 The way you solved the cors was just 😌
@anirudhagandhare6294
@anirudhagandhare6294 3 года назад
I just thought of a project that needed web sockets and i get a notification of this video
@ismail.dalhatu
@ismail.dalhatu 3 года назад
Thank you kyle I was struggling with web socket when I saw this notification
@shadmanfatin777
@shadmanfatin777 11 месяцев назад
Kyle Cook, the best teacher! 🤗
@gowthams4114
@gowthams4114 3 года назад
U r my inspiration
@jarodday1299
@jarodday1299 Год назад
My capstone class is finishing up a 7-week project where we learned all about server-side and database related frameworks, libraries, and other related syntax in Javascript. This tutorial is foundational to my completion of the project and I, as well as many others, owe it to you for your concise, sharp delivery in teaching. We thank you for being so instrumental in our learning journeys
@moshemo613
@moshemo613 3 года назад
Is there a github repository for this lesson? I would like to see the code.
@green__apple
@green__apple 2 года назад
Thank you for organizing everything about the socket! It's better quality than other paid lectures. Thank you very much!
@khalidsayyad9887
@khalidsayyad9887 6 месяцев назад
He really went ahead and did it. Yeah the title of the video
@saadhisham2754
@saadhisham2754 Год назад
need some assistance with deploying my web application. Although it works perfectly fine on my local machine, I'm experiencing issues when trying to deploy it on Glitch. I've already tried changing the CORS settings, but unfortunately, it hasn't resolved the issue. Could you please help me troubleshoot the problem?
@wala-eddine
@wala-eddine 3 месяца назад
i didn't find this repo
@Moessam-yn1vb
@Moessam-yn1vb 3 месяца назад
Did you find it yet?
@wala-eddine
@wala-eddine 3 месяца назад
@@Moessam-yn1vb no but i worked with my template
@GanaTubeYou
@GanaTubeYou 3 года назад
Can u make a video on mern a smal one covering the basics
@arifarslanturk2951
@arifarslanturk2951 3 года назад
its a fkn nice content !
@toastrecon
@toastrecon Месяц назад
Awesome video! Thank you!
@Gigabyteserviceofficial
@Gigabyteserviceofficial 3 года назад
It would be cool if you can make room by example.com/my_random_room_name and if you can add JWT token then it's superb!! like example.com/my_room_name_name?jwt=xxxxxx if the token is true then and then the user can enter into room or room will get created. because this way we can embed chat app into any web app like other apps can authenticate on behalf of users by sending the token to the chat app. thank you very much for this video because it's in simple js without using any frontend library like react.
@professorice4325
@professorice4325 Год назад
Using this for a gambling site. I'm barely in but seeing your intro "No Stack to Full Stack" made me laugh. Very Clever
@Furkanh66
@Furkanh66 3 года назад
I have a question. Why do web dev's use html and css and stuff if you have programms like figma. "btw, no offense tho, I'm trying to learn html and css too, so no hate"
@ivanbozveliev5335
@ivanbozveliev5335 2 года назад
thx about the video.You explain very good :) but i am having trouble installing admin-ui .an error occurs 'The splatting operator '@' cannot be used to reference variables in an expression...'
@StreetTalkAE
@StreetTalkAE 2 года назад
i have the same, did you solve it?
@ivanbozveliev5335
@ivanbozveliev5335 2 года назад
@@StreetTalkAE No. Maybe we need to install different library I'm not sure. And nobody wants to tell me 😁
@StreetTalkAE
@StreetTalkAE 2 года назад
@@ivanbozveliev5335 you need to add -% before @, it worked for me ;)
@ivanbozveliev5335
@ivanbozveliev5335 2 года назад
@@StreetTalkAE thank you!
@siddharthmishra8233
@siddharthmishra8233 Год назад
@11:08 instead of using broadcast we can just do one thing in the code of script.js we can just remove the line displaymessage(message) before the socket.emit ("send-message");
@joegoodman4358
@joegoodman4358 3 года назад
Hey Kyle, how could I test my websocket on postman? I tried that, but I could not success. It wasn't as simple as creating a New Websocket Request, putting the url and clicking "Connect" :( ...anyway thank you for this video
@maxgeorgievsky9527
@maxgeorgievsky9527 2 года назад
One question - when i call emit callback on sever - this callback has access to the context where it was declared? Or how it know what displayMessage function or document object is in this example?
@الجورزماوي
@الجورزماوي 3 месяца назад
If anyone need the Code just replay and i will upload it for you
@الجورزماوي
@الجورزماوي 3 месяца назад
You have to add credentials: true inside the const io with cors so it connects as minute 19:04 NOTE That using brave browser won't work
@twelvefifty6187
@twelvefifty6187 3 года назад
12 minutes? Wow I thought you were like a channel that doesn’t upload that just had a massive backlog of videos.
@aranguren12
@aranguren12 Год назад
Fantastic lesson. Noob question: I wish to implement a socket inside a Lambda that will be deployed to the cloud, how does the "port/server" work in this case?
@anbiabohlam5468
@anbiabohlam5468 9 месяцев назад
How to authenticate websocket connection
@pattmehta5835
@pattmehta5835 Год назад
Thank you, this is a very in depth tutorial on socketio and you did a very good work with the examples
@miscdofanaro
@miscdofanaro Год назад
1:00 But what is Snowpack???
@RisyadHasbullah
@RisyadHasbullah 3 года назад
Always making me curious with new stack 👍
@mohammadtavakoly6160
@mohammadtavakoly6160 2 года назад
thank you so much , but something missing is (deploy) in real host, any plan for it !!?!?!?!
@obipascalbanjuare1854
@obipascalbanjuare1854 3 года назад
Please how do we deploy and and properly configure socket.io in production and have it upgrade from long pulling to websocket ?
@soumikjana2993
@soumikjana2993 2 года назад
Hey , how did you learn all this . I tried learning from the socket docs but felt like being dropped in the ocean(Yes I am a beginner). Some tips on how to approach a new tech and how to read documentation please.
@elad3958
@elad3958 Год назад
I love your fucking channel
@damian20097
@damian20097 Год назад
Good job. This video is really helped me understand the basics of Socket io. Do what you'are doing and don't stop.
@gauravsharma-lu4if
@gauravsharma-lu4if 3 месяца назад
bro you are a legend!, you teach things so simply thank you soo much.Keep uploading more and help us.
@helloworldliberationforall
@helloworldliberationforall 2 года назад
How to find socket id of a specific online user? If we are storing online users in a set in a socket file on a server (with createIo, io.on("connect") erc... ?
@forcowicz5830
@forcowicz5830 3 года назад
You're not only making great tutorials, but you are also a really good life coach I can say by watching some of your videos XD
@doronsages983
@doronsages983 2 года назад
it's a weird question, but how do you use import statements using this vanilla js running on the browser? can you share your index.html and package.json please? Thanks!
@timlinator
@timlinator Год назад
Great video but I couldn't find the code on your github. Do you have a link?
@tommylee6670
@tommylee6670 8 месяцев назад
Thank you very much for your wonderful sharing! Do you have the source code on Github?
@luislauropajuelo2119
@luislauropajuelo2119 2 года назад
I have a multi tenant application, and what I need is to create an independent api socket that generates dynamic routes (from different domains) that in turn are tokenized, each route will be used by a chat between two people without authenticating. What do you recommend to use?
@ascodes3461
@ascodes3461 11 месяцев назад
8seful and man you've explained amazingly...Thank you soo much 😍😍
@shokhbozabdullayev6260
@shokhbozabdullayev6260 3 года назад
Hello Kyle. Wanted to see your JWT authentication crash course with refresh and access tokens strategy using express and mongo db. Thanks in advance!
@MFR-85
@MFR-85 Год назад
When creating these private rooms, how would we make it so that a unique link is created for the room?
@SushantShekhar-my7eu
@SushantShekhar-my7eu Год назад
bro.. where is the github page for the boilerplate?
@jamesminhtran5964
@jamesminhtran5964 Год назад
Is the code available for download? If not, I will re-type the code while the video is playing.
@deependrasinghshekhawat2856
@deependrasinghshekhawat2856 2 года назад
I created a server using express for my client, the issue I am having is when I open the client in 2 browsers it's not generating 2 different id's for the clients.
Далее
socket io crash course | easy way
40:57
Просмотров 99 тыс.
Офицер, я всё объясню
01:00
Просмотров 4 млн
Learn JavaScript Event Listeners In 18 Minutes
18:03
Просмотров 588 тыс.
Being Competent With Coding Is More Fun
11:13
Просмотров 82 тыс.
Mongoose Crash Course - Beginner Through Advanced
33:36
How Web Sockets work | System Design Interview Basics
5:28
The Most Important Skill You Never Learned
34:56
Просмотров 207 тыс.
Socket.io Introduction - How to Build a Chat App
21:38
How principled coders outperform the competition
11:11