9886936 Nov 15, 2016
1 contributor

Users who have contributed to this file

52 lines (31 sloc) 1.83 KB

Examples Overview

The examples give an overview of the features of WAMP by providing working code.

Read, run, and modify as you like!

There are two main sources of examples:


The JavaScript code provided generally runs both in the browser and in Node.js. When using the browser, load the JavaScript via the provided HTML page. Each example also contains Python versions. Python and JavaScript versions are interoperable: You may run e.g. a JavaScript subscriber and a Python publisher.

Running examples

All examples require a WAMP router.

We suggest using, an open source WAMP application router.

For the installation of, see the project documentation.

Examples from the Autobahn|Python repo

Once you've installed, open a command shell, create a test directory, initialize and start it.

mkdir test1
cd test 1
crossbar init
crossbar start

Code runs both in the browser and in Node.js.

For the latter, you need to have Autobahn|JS installed. To do so, in a shell do

npm install autobahn
npm install when

Examples from the crossbarexamples repo

The examples here all include a configuration for the example.

So do

crossbar start

in the example directory and then open a Web browser to 'localhost:8080'.