node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey »


WebSocket Conference Server

A simple out of the box HTTP & WebSocket server for multiple connection sessions. Leverages the very excellent websocket module to make a plug and play conference style server.

While little more than an abstracion layer on top of websocket it enables me to rapidly prototype by setting up a new server by:

>> Spin up AWS EC2 instance (Arch Linux - core only + ssh) 
>> pacman -S nodejs 
>> npm install websocket-conference-server 
>> node
>> require('websocket-conference-server').start()

...and its ready to server http files, and host a WebSocket conference.

It's then easily customisable by passing optional config object and custom_utilities.js which I need to get around to document but should be fairly clear from the source code.

Installing the module

With npm:

npm install websocket-conference-server

Quick usage:

var server = require('websocket-conference-server').start();

Defaults to listening on port 8000, for echo-protocol, with logging set to full console debug but no file system records.

All http requests will be served from current directory.

Custom usage:

var server = require('websocket-conference-server');
// -- Set the optional configuration 
var config = {
    verbosity  : 1,
    protocol  : my-custom-protocol,
    port  : 8001,
    logs_path      : 'Logs/',
    IP_lookup_path  : 'IPs/',
    logs_suffix : '-alpha.log',
    http_paths  : {
        'ico'   : '../Assets',
        'jpg'   : '../Assets',
        'png'   : '../Assets',
        'html'  : '..',
        'css'   : '..',
        'js'    : '..'  
// -- 
// -- Import any custom handlers, functions 
var custom_utilities = require("./my_custom_utilities");
// This should accept, augment and return the utilities object, eg: 
// utilities = custom_utilities.augment(utilities); 
// -- 
// -- Boot conference server with custom options, protocol and functions  
server.start( config , custom_utilities );
// -- 

Patches & Feedback: