Skip to content

somata/somata-websocket-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

somata-websocket-server

Bridge between websocket clients and Somata services, using ws.

Installation

npm install somata-websocket-server

Usage

swss = require 'somata-websocket-server'
swss {port: 5555}

From the client, connect with somata-websocket-client:

swsc = require 'somata-websocket-client'
client = swsc 'ws://localhost:5555'

Using with Polar or Express

http = require 'http'
polar = require 'polar'
swss = require 'somata-websocket-server'

server = http.createServer()
swss {server}

app = polar()
server.on 'request', app

app.get '/', (req, res) ->
    res.render 'app'

server.listen 5999, -> console.log "Listening on :5999"

About

Somata websocket bridge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published