Last active
August 29, 2017 20:12
-
-
Save pomle/414187323c6fdb0a08bf0c82139e3378 to your computer and use it in GitHub Desktop.
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
<script src="http://cdn.snex.io/snex.latest.min.js"></script> | |
<script type="text/javascript"> | |
snex.createSession() | |
.then(session => { | |
session.on('connection', conn => { | |
console.log('Player joined!'); | |
conn.on('data', data => { | |
console.log('Player signal', data); | |
}); | |
}); | |
return session.createURL('nes'); | |
}) | |
.then(link => { | |
// Prints "Go to http://snex.io/XAGE to play!" | |
console.log(`Go to ${link.url} to play!`); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment