O'Reilly logo

Learning Node.js for Mobile Application Development by Milorad Jevdjenic, Stefan Buttigieg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using WebSockets in Node.js

Node.js does not come with a default module for using WebSockets. While we have tried so far to avoid third-party solutions and just show you how to work with Vanilla node, this topic is complex enough to put writing a WebSocket handler from scratch well beyond the scope of the book. Therefore, for the remainder of this chapter, we will use the excellent socket.io library. We of course do not imply that this is what you should be using in your own work, and in the Chapter 6, Introducing Ionic, the Going further section at the end of the chapter, we will direct you to alternative solutions and reading materials for WebSockets.

Setting up our project

We will set up a separate project for this chapter, demonstrating how ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required