@eventsquare/gate

0.0.2 • Public • Published

EventSquare Gate

Server and client for real-time communication at events between devices.

Installation

npm i -s @eventsquare/gate

Starting a server

const EventSquareGate = require('@eventsquare/gate');

var Server = new Gate.Server({
    encryption_key: 'XXXXXX',
    port: 3000
});

Server.start();

Creating a client

Node.js

const EventSquareGate = require('@eventsquare/gate');

var Client = new Gate.Client({
	name: 'Macebook Pro of Jane',
	encryption_key: 'XXXXXX'
});

Client.open('http://localhost:3000');

Client.on('connect',function(){
    console.log('Connected');
})

Client.on('disconnect',function(){
    console.log('Disconnected');
})

Webpack or Browserify

var EventSquareClient = require('@eventsquare/gate/lib/client')

var esq = new EventSquareClient({
    name: 'iPhone from Joe',
    encryption_key: 'XXXXXX'
}); 

esq.open('http://localhost:3000');

esq.on('connect',function(){
    console.log('Connected');
})

esq.on('disconnect',function(){
    console.log('Disconnected');
})

Readme

Keywords

none

Package Sidebar

Install

npm i @eventsquare/gate

Weekly Downloads

1

Version

0.0.2

License

none

Unpacked Size

765 kB

Total Files

9

Last publish

Collaborators

  • stephen.deceuster
  • willemstaels