Some sample code that uses the page-worker api to implement a websocket client.
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
addon
client
server
README.md

README.md

Websocket / Jetpack demo

A demo that implements a websocket client in a Jetpack Add-on using the page-worker module.

System Requirements
Starting the server

Open a terminal and type in the following:

$ node server/app.js

Starting the add-on client

Open a new terminal / terminal tab and activate the SDK environment.

$ cd $path\to\sdk
$ source bin/activate
$ cd $path\to\demo
$ cfx run

To monitor the websocket connection, a simple html client is supplied at client/index.html.