Skip to content
This repository has been archived by the owner on Jan 7, 2019. It is now read-only.

ptejada/ApePubSub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

End Of Life

This library was made specifically for APE server as the backend which unfortunately is no longer maintain. For backend and front-end solutions I recommend checking out Socket.IO

ApePubSub

ApePubSub is an alternative event driven pub/sub framework to the official APE_JSF for the APE Server. It is written in plain javascript.

The client framework is based on @paraboul's next generation APE_JSF draft and the server framework is a compilation of custom commands, hooks and rewrites from the official framework, the actual server binary do not requires modification.

Getting Started

Read more about the project

Get Started

See what is new in the Changelog

Checkout the live demos, the demo sources can be found here

Code documentation

Public Documentation - wiki

Simple program example:

    // Initialize the client object
    var client = new APS('ape.ptejada.com');

    // Subscribe to the channel and add some event listeners
    client.sub('test', {
      // Event triggered when a user joins channel
      join: function(){
        alert('A user has joined the channel :)');
      },
      // Event triggered when a user leaves a channel
      left: function(){
        alert('A user has left the channel :(')
      }
    });

Is that simple and pretty much self explanatory what the above will do.

Setting up APE on Windows

To setup a test environment on windows a Vagrant box is bundled on this repo. To use the bundled box you must have Vagrant and VirtualBox install on your machine. Note that this setup should also work on nay other environment where Vagrant is supported.

To initialize the Vagrant box simply run this command from the root of the directory:

vagrant up

The process might take some time as a file of about 500MB will be downloaded. Once installed and running, login in to the virtual machine running the following command

vagrant ssh

Once you are ssh in the virtual machine a clone of APS-deploy will be on the /home/vagrant/ape directory with a pre-compiled version of the APE server. To run it execute this commands on the virtual machine:

cd ape
./start

For more commands available for the APS-Deploy project refer to https://github.com/ptejada/APS-Deploy#commands

Once the APE server is running in the virtual machine it is accessible to the host machine via http://localhost:6969

Note: Since running the server locally, the localhost-plugin script can be included in your application to avoid manually adding fake subdomains to the host file.

For more information check the wiki

NOTE: when updating the framework make sure that you update the server scripts as well, you can tell if the server scripts need updating if the the folder APE_Server has been changed in the commit or recently.

Browser Support

The framework is tested and developed in the following modern browsers:

  • Internet Explorer 9+
  • Google Chrome
  • Mozilla Firefox

It should also work in other webkit and mobile browsers such as Opera, Safari, Safari Mobile and the stock Android Browser. Internet Explorer 8 and below is not supported.

Feedback?

For reporting issues use the GitHub issues system, is really good and organized :)

For discussions, join the Google Group

About

A PubSub JavaScript Framework for the APE Server

Resources

License

Stars

Watchers

Forks

Packages

No packages published