Naivete Precedes Misrepresentation
Miss any of our Open RFC calls?Watch the recordings here! »

solid-ws

0.4.2 • Public • Published

solid-ws

Node/Javascript implementation of Websockets for Solid

Usage

Simple way

var ldnode = require('ldnode')

var server = ldnode.createServer({live: true})

server.listen(port, function () {
  console.log('Solid server started')
})

Short way

var SolidWs = require('solid-ws')
var ldnode = require('ldnode')

var server = ldnode.createServer()
solidWs(server)

server.listen(port, function () {
  console.log('Solid server started')
})

Long way

var SolidWs = require('solid-ws')
var ldnode = require('ldnode')
var express = require('express')
var https = require('https')

var app = express()
app.use('/databox', ldnode())
var server = https.createServer({/* your settings*/}, app)

server.listen(port, function () {
  console.log('Solid server started')
})

// Attach WS to solid
solidWs(server, app)

Install

npm i solid-ws

DownloadsWeekly Downloads

62

Version

0.4.2

License

MIT

Unpacked Size

11.4 kB

Total Files

8

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar