2.0.1 • Published 7 years ago

ctrl-web-socket-server v2.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

ctrl-web-socket-server

Build Status Codacy Badge Codacy Badge

An abstraction around socket.io.

Installation

Yarn is recommended for installation.

$ yarn add ctrl-web-socket-server

But you can still use npm.

$ npm install --save ctrl-web-socket-server

Usage

Simple (built-in NodeJS HTTP Server):

const CtrlWebSocketServer = require('ctrl-web-socket-server')
const http = require('http')

const httpServer = http.createServer()
const ctrlWebSocketServer = new CtrlWebSocketServer({httpServer})

httpServer.listen(8080)

Using the ctrl framework:

const CtrlHttpServer = require('ctrl-http-server')
const CtrlWebSocketServer = require('ctrl-web-socket-server')

const httpServer = new CtrlHttpServer({port: 8080})
const webSocketServer = new CtrlWebSocketServer({httpServer})

httpServer.start()

Methods

Full documentation to come soon!

License

Copyright (c) 2016 Martin Experiments LLC

MIT (https://www.opensource.org/licenses/MIT)

2.0.1

7 years ago

2.0.0

7 years ago

1.1.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago