Code Monkey home page Code Monkey logo

holler's Introduction

real-time, in-app notifications and admin for web and mobile via the command line. see it in action

##Usage Sending notifications with Holler is as easy as four steps:

###1. Install a module 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 -g

###2. Include Holler

New! Be sure to include the holler.css stylesheet as of v1.9.0:

<link href="PATH/TO/holler/css" rel="stylesheet"/>

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>

###3. Start a server The server can be started with an optional port. If no port is specified, it will be defaulted to 1337.

holler-server 1337

###4. Holler stuff Show notifications to all users currently using your app in real-time using holler.js. Notifications use Alertify so they look nice and sexy.

  • Log Messages

holler http://yourServerUrl:port log "This is a standard log message."
  • Success Messages

holler http://yourServerUrl:port success "This is a success message."
  • Error Messages

holler http://yourServerUrl:port error "This is an error message."
  • Refresh Page

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.

holler http://yourServerUrl:port refresh
  • Error Messages

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.

holler http://yourServerUrl:port redirect http://someOtherUrl

##Contributing Holler.js uses Grunt for file linting and uglification. To start contributing, first make sure node is installed. Then:

git clone https://github.com/bitpshr/holler.git && cd holler
git submodule update --recursive --init
npm install
# start a server at localhost (e.g. http://127.0.0.1)
holler-server
# view demo.html in a browser
# send a log message
holler http://127.0.0.1:1337 log "foobar"

##License WTFPL

holler's People

Contributors

bitpshr avatar

Watchers

James Cloos avatar chuandadexiaoyu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.