Configuration options

When creating a new PushJS, you can give optional parameters as a configuration object.

  • ready: pass a callback function which will be executed as soon as PushJS is fully loaded
  • host: pushjs server location host
  • port: pushjs server location port

Server locations

  • Europe:
The default is when no host or port is set.

An example of a fully configured PushJS


    window.onload = function() {

            readyListener: onReadyListener,
            host: '',
            port: 9101

    function onReadyListener() {
        console.log('Hello! Welcome to PushJS');