From 8d55c95653cf9451cc72fef8b72e138cd6fb0944 Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Sat, 21 Jun 2014 21:00:59 +0200 Subject: [PATCH] improve readme --- examples/twisted/wamp/basic/README.md | 65 +++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/examples/twisted/wamp/basic/README.md b/examples/twisted/wamp/basic/README.md index b8bdd2a2..ef4bd7e3 100644 --- a/examples/twisted/wamp/basic/README.md +++ b/examples/twisted/wamp/basic/README.md @@ -62,3 +62,68 @@ E.g. the Python examples can be run cd pubsub/basic python backend.py ``` + + +## Hosting + +Crossbar.io is a WAMP router that can also act as a host for WAMP application components. E.g. to let Crossbar.io host a backend application component, you can use a node configuration like this: + +```javascript + +{ + "controller": { + }, + "workers": [ + { + "type": "router", + "options": { + "pythonpath": ["f:\\scm\\tavendo\\autobahn\\AutobahnPython\\examples\\twisted\\wamp\\basic"] + }, + "realms": [ + { + "name": "realm1", + "roles": [ + { + "name": "anonymous", + "permissions": [ + { + "uri": "*", + "publish": true, + "subscribe": true, + "call": true, + "register": true + } + ] + } + ] + } + ], + "components": [ + { + "type": "class", + "classname": "pubsub.complex.backend.Component", + "realm": "realm1" + } + ], + "transports": [ + { + "type": "web", + "endpoint": { + "type": "tcp", + "port": 8080 + }, + "paths": { + "/": { + "type": "static", + "directory": ".." + }, + "ws": { + "type": "websocket" + } + } + } + ] + } + ] +} +``` \ No newline at end of file