Created
March 5, 2015 11:55
-
-
Save johngeorgewright/b6a410528bb93c245180 to your computer and use it in GitHub Desktop.
Autobahn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Connection} from 'autobahn'; | |
var connection = new Connection({ | |
url: 'ws://127.0.0.1:8080/ws', | |
realm: 'realm1', | |
use_es6_promises: true | |
}); | |
connection.onopen = (session) => { | |
session.subscribe('com.myapp.page', (args) => { | |
console.log(args); | |
// Store data in database | |
}); | |
}; | |
connection.open(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global.AUTOBAHN_DEBUG = true; | |
require('babel/register'); | |
require('./app.es'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment