Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nodesolidserver/node-solid-ws
Node/Javascript implementation of Websockets for Solid
https://github.com/nodesolidserver/node-solid-ws
running-code
Last synced: 2 months ago
JSON representation
Node/Javascript implementation of Websockets for Solid
- Host: GitHub
- URL: https://github.com/nodesolidserver/node-solid-ws
- Owner: nodeSolidServer
- Created: 2015-09-27T14:24:58.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2024-03-16T03:49:02.000Z (10 months ago)
- Last Synced: 2024-04-14T04:28:30.377Z (9 months ago)
- Topics: running-code
- Language: JavaScript
- Homepage: http://npm.im/solid-ws
- Size: 114 KB
- Stars: 8
- Watchers: 18
- Forks: 5
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# solid-ws
[![](https://img.shields.io/badge/project-Solid-7C4DFF.svg?style=flat-square)](https://github.com/solid/solid)> Node/Javascript implementation of Websockets for Solid
## Usage
### Simple way
```javascript
var ldnode = require('ldnode')
var server = ldnode.createServer({live: true})
server.listen(port, function () {
console.log('Solid server started')
})
```### Short way
```javascript
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
```javascript
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)
```