Skip to content
Newer
Older
100755 92 lines (71 sloc) 2.91 KB
317423c Update old links
bitpshr authored
1 [Holler.js](http://holler.bitpshr.net)
3c7eeb0 Updates
bitpshr authored
2 =================
86070a0 Pushing demo and stuff
bitpshr authored
3
317423c Update old links
bitpshr authored
4 real-time, in-app notifications and admin for web and mobile via the command line. [see it in action](http://holler.bitpshr.net)
86070a0 Pushing demo and stuff
bitpshr authored
5
3c7eeb0 Updates
bitpshr authored
6 ##Usage
7 Sending notifications with Holler is as easy as four steps:
86070a0 Pushing demo and stuff
bitpshr authored
8
3c7eeb0 Updates
bitpshr authored
9 ###1. Install a module
bb88709 Readme update
bitpshr authored
10 Holler is built with <a href="http://nodejs.org/">Node</a> and is distributed as an <a href="http://npmjs.org">npm</a> module. If you don't have Node yet, <a href="http://nodejs.org/">install the hell out of it</a>. Next we just install holler:
3c7eeb0 Updates
bitpshr authored
11 ```console
8433d3e Added ability to refresh current page & redirect to new url if necessary
bitpshr authored
12 npm install holler -g
3c7eeb0 Updates
bitpshr authored
13 ```
86070a0 Pushing demo and stuff
bitpshr authored
14
7e28d22 Bump version to 1.9.0, new theme, new version of Alertify, etc.
bitpshr authored
15 ###2. Include Holler
16
17 **New!** Be sure to include the <code>holler.css</code> stylesheet as of v1.9.0:
18 ```html
19 <link href="PATH/TO/holler/css" rel="stylesheet"/>
20 ```
21
3c7eeb0 Updates
bitpshr authored
22 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 <code>hollerConfig</code> object. The <code>holler-client.js</code> script tag should then be included:
23 ```html
24 <script>
25 var hollerConfig = {
26 host: "http://127.0.0.1",
27 port: "1337"
28 }
29 </script>
30 <script type="text/javascript" src="PATH/TO/holler-client.min.js"></script>
31 ```
86070a0 Pushing demo and stuff
bitpshr authored
32
3c7eeb0 Updates
bitpshr authored
33 ###3. Start a server
34 The server can be started with an optional port. If no port is specified, it will be defaulted to 1337.
67c18ca Now an NPM module
bitpshr authored
35 ```console
36 holler-server 1337
3c7eeb0 Updates
bitpshr authored
37 ```
38
39 ###4. Holler stuff
40 Show notifications to all users currently using your app in real-time using <code>holler.js</code>. Notifications use <a href="http://fabien-d.github.com/alertify.js/">Alertify</a> so they look nice and sexy.
41 * Log Messages
42
317423c Update old links
bitpshr authored
43 ![](http://holler.bitpshr.net/img/log.png)
3c7eeb0 Updates
bitpshr authored
44 ```console
67c18ca Now an NPM module
bitpshr authored
45 holler http://yourServerUrl:port log "This is a standard log message."
3c7eeb0 Updates
bitpshr authored
46 ```
47
48 * Success Messages
49
317423c Update old links
bitpshr authored
50 ![](http://holler.bitpshr.net/img/success.png)
3c7eeb0 Updates
bitpshr authored
51 ```console
67c18ca Now an NPM module
bitpshr authored
52 holler http://yourServerUrl:port success "This is a success message."
3c7eeb0 Updates
bitpshr authored
53 ```
54
55 * Error Messages
56
317423c Update old links
bitpshr authored
57 ![](http://holler.bitpshr.net/img/error.png)
3c7eeb0 Updates
bitpshr authored
58 ```console
67c18ca Now an NPM module
bitpshr authored
59 holler http://yourServerUrl:port error "This is an error message."
3c7eeb0 Updates
bitpshr authored
60 ```
61
8433d3e Added ability to refresh current page & redirect to new url if necessary
bitpshr authored
62 * Refresh Page
63
64 Now you can use holler to perform admin tasks such as refreshing the current page. Again, all users using the app will have their page refreshed in real-time.
65 ```console
66 holler http://yourServerUrl:port refresh
67 ```
68
69 * Error Messages
70
71 You can also redirect the current page to a new url. Again, all users using the app will have their page redirected in real-time.
72 ```console
73 holler http://yourServerUrl:port redirect http://someOtherUrl
74 ```
75
a256619 Add submodules for alertify and bootstrap, checkout tags, use grunt
bitpshr authored
76 ##Contributing
77 Holler.js uses [Grunt](http://gruntjs.com) for file linting and uglification. To start contributing, first make sure [node](http://nodejs.org) is installed. Then:
78
79 ```bash
80 git clone https://github.com/bitpshr/holler.git && cd holler
8dd3e1d updates
bitpshr authored
81 git submodule update --recursive --init
a256619 Add submodules for alertify and bootstrap, checkout tags, use grunt
bitpshr authored
82 npm install
83 # start a server at localhost (e.g. http://127.0.0.1)
84 holler-server
85 # view demo.html in a browser
86 # send a log message
87 holler http://127.0.0.1:1337 log "foobar"
88 ```
3c7eeb0 Updates
bitpshr authored
89
90 ##License
91 [WTFPL](http://sam.zoy.org/wtfpl/)
Something went wrong with that request. Please try again.