Back to Browse

How to use WebSockets to create an online application | JavaScript, NodeJS, CSS, HTML

536 views
Oct 23, 2024
52:30

I'm happy to announce the release of the first video tutorial since my return. In this video, we learn how to build an online application using the WebSockets protocol. We start with discussing what WebSockets are and what problems they try to solve. We put them into action by building a server to hold the single source of truth. Then, finally, build a chat client that communicates with it. Ultimately, the goal is to get the foundations of what is required to build a real-time application so we can use what we've learnt to build online games. If you'd like to support what I do, get access to the code or say thank you, why not visit my Patreon page here? https://www.patreon.com/shezzor Links: NodeJS WebSocket dependency: https://github.com/websockets/ws #WebSockets #javascript #chatapp Timestamps: 00:00 Intro 01:22 Understanding standard web communication solutions 03:39 Understanding WebSockets 06:05 Defining the monorepo project 07:45 Setting up the backend with NodeJS 10:10 Setting up a WebSocket server 12:49 Setting up the client application 13:12 Handling connecting and disconnecting 16:47 Setting up server state 18:22 Enabling basic messaging between server and client 25:31 Enabling chat messages 33:17 Adding usernames to messages 39:22 Adding join and leave messages 41:51 Adding the chat room header 44:55 Enabling a live "is typing" message 51:00 Recap

Download

0 formats

No download links available.

How to use WebSockets to create an online application | JavaScript, NodeJS, CSS, HTML | NatokHD