O'Reilly logo

PhoneGap By Example by Andrey Kovalenko

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

Building our first real-time communication application

We have successfully created a basic Cordova application with Crosswalk support. Before moving forward, let's create a simple server to handle our needs for the application we are building.

Server side

As we discussed earlier, we need to build a signaling (STUN) server. We can do this easily with Node.js. For now, we are not digging into the TURN server setup, because we will test it in the local network without enterprise NAT traversal and firewalls.

We need create a simple Node.js application with socket.io. Let's start by creating package.json. We can do this easily with the npm init command. Follow several simple steps, and we will have something similar to these lines of code:

{ "name": "pumpidu", ...

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