commonland
The idea of this package: It provides a socket.io layer that allows synchronized group interaction on a given website (events, chat, but also text input) By this means one can think of collaborative writing / programming / website demonstrations.
Using it conventionally
If you want to use it by embedding the files, you have to add the following files from the lib and css folder. You should alco incorporate the img folder.
Creating an instance looks like this, explained below.
var params = {}; paramsurl = 'http://127.0.0.1:3333'; paramsroom = "admin"; var c = "logo" params;
To make us you have to start the socket.io server, that you find in the sever foilder (see below)
Installation via npm
npm install common-land
Server
To require the library, you write:
var common = ;
To start an instance, you may pass an http server as an argument or leave the parameter empty. Then the socket.io Server will be started on port 3333
var socket = ;
Client
Client side, you create an index.js file that might look like this:
var $ = ;var common = ; ;
-
the params.url takes the url and port information where the server is running
-
the params.room create the room that holds your users
-
the first parameter of the object holds the dom element on which contains the elements that shall be shared, the second the server parameters
icons
- Daouna Jong, collaboration
- Stefano Vetere, chat
- Hrag Chanchanian, exit
- Rohit M. S., record
- BaveBros, play