pusher/pusher-js — Issue #16: Browser runtime required?
Author: kastork
Created: 2012-02-06 01:57:37+00:00
State: open

Hi,

The library appears to assume that it is running in the context of a browser. I wonder if it would be feasible to make it agnostic with respect to the runtime so that you could, for instance, load the library in a NodeJS app.

For example in a nodejs application if you say:

Pusher = require('./pusher.min.js');

you get this error:

TypeError: Cannot set property 'EventsDispatcher' of undefined

Perhaps this would better be done as a NodeJS client library...