Skip to content

philippbosch/pusher-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

pusher-url

pusher-url is a package for Node.JS that makes it even easier to use the awesome Pusher service in a Node.JS app on Heroku.

Installation

Inside your Heroku-enabled app directory:

$ heroku addons:add pusher:sandbox
$ npm install pusher-url

Usage

By default configuration parameters are taken from the PUSHER_URL environment variable that Heroku automatically sets for you when you add the Pusher addon. For local development you might want to set it on your local machine as well (grab the URL from heroku config and set it with export PUSHER_URL=<url>. Check autoenv if you don't save keystrokes.

// get connection parameters from environment
var pusher = require('pusher-url').connect();

// set a specific URL
var pusher = require('pusher-url').connect('http://<key>:<secret>@api.pusherapp.com/apps/<appid>');

License

MIT

About

Easy configuration for node-pusher on Heroku

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published