Holler is built with Node and is distributed as an npm module. If you don't have Node yet, install the hell out of it. Next we just install holler:
npm install holler
On the client, Holler can be easily configured to use a specific host and port regardless of the app's http server. This is done via a global hollerConfig
object. The holler-client.js
script tag should then be included:
<script> var hollerConfig = { host: "http://127.0.0.1", port: "1337" } </script> <script type="text/javascript" src="PATH/TO/holler-client.min.js"></script>
Heads up! The hollerConfig object is optional. If it is not defined, the host will default to 127.0.0.1 and the port will default to 1337.
The server can be started with an optional port. If no port is specified, it will be defaulted to 1337.
holler-server 1337
Show notifications to all users currently using your app in real-time using holler.js
. Notifications use Alertify so they look nice and sexy. See it in action.
holler http://yourServerUrl:port log "This is a standard log message."
holler http://yourServerUrl:port success "This is a success message."
holler http://yourServerUrl:port error "This is an error message."
Try this! Open up multiple browser windows all pointing to your test page. All windows should receive the notification in real-time.