Socket.IO is a WebSocket framework that allows your WebSocket applications to have a broader reach. With Socket.IO, you can create content for browsers that do not support WebSockets. Alex Banks demonstrates how to install Socket.IO and how to use Socket.IO with Express to create a socket application.
- In the last lesson, … we created a WebSocket and connected to it … using the native WebSocket object in the browser. … Native WebSockets are cool, but there are some edge cases … that a native WebSocket cannot handle on its own. … If we want our applications to work in 100% … of the browsers, we need a solution that can still work … if WebSockets are not supported. … Socket.io is a WebSocket framework that fills back … It also comes with a lot of tools to help us build … large-scale WebSocket applications with ease. … that's supported in every browser. … So let's go ahead and start using socket.io. … So the first thing I'm going to do is come over … to the terminal and install socket.io. … so we get a packaged .json and then npm i socket.io. … All right, so now that we have socket.io installed, … we're going to go ahead and create a socket server using it. … I'm going to go ahead and do a new file … and we will call this socket-server.js … and within this socket-server.js file, … the createServer function from http. …
- Making HTTP requests
- Building web and file servers
- Installing packages with npm
- Managing and linking global packages
- Working with Express, the web server framework
- Handling POST and DELETE requests
- Creating WebSockets
- Testing and debugging Node.js code
Skill Level Advanced
Node.js: Real-Time Web with Socket.IOwith Emmanuel Henri1h 24m Intermediate
Work with VSCode1m 59s
1. The HTTP Module
3. Web Servers
5. Node.js Testing
6. Automation and Deployment
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.