Skip to content

Instantly share code, notes, and snippets.

@danveloper
Last active December 15, 2015 05:20
Show Gist options
  • Save danveloper/5208601 to your computer and use it in GitHub Desktop.
Save danveloper/5208601 to your computer and use it in GitHub Desktop.
UI Atmosphere Subscription -- Real Time Logging
<!-- ... resources & jquery snipped for brevity ... -->
<atmosphere:resources/>
<r:script>
$(document).ready(function() {
var url = '${createLink(uri:ApplicationHolder.application.config.grails.atmosphere.mappingUri)}';
$.atmosphere.subscribe(url, Logging.router, $.atmosphere.request = {transport:'websocket', fallbackTransport:'streaming'});
...
});
</r:script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment