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.
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
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.
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.
@@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.
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.....
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)
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.
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
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.
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.
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 ??
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
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.
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
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?
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!
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.
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.
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
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".
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.
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 ?
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?
why am I getting this error?? Uncaught TypeError: Failed to resolve module specifier "socket.io-client". Relative references must start with either "/", "./", or "../".
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
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?
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.
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"
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...'
@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");
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
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?
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?
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.
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... ?
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!
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?
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.