@live-change/db-server 0.4.82 → 0.4.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Server.js +4 -4
- package/lib/backend.js +0 -3
- package/package.json +12 -12
package/lib/Server.js
CHANGED
|
@@ -2,7 +2,7 @@ const fs = require('fs')
|
|
|
2
2
|
const path = require('path')
|
|
3
3
|
const http = require("http")
|
|
4
4
|
const express = require("express")
|
|
5
|
-
const sockjs = require('sockjs')
|
|
5
|
+
const sockjs = require('@live-change/sockjs')
|
|
6
6
|
const WebSocketServer = require('websocket').server
|
|
7
7
|
const ReactiveDaoWebsocketServer = require("@live-change/dao-websocket").server
|
|
8
8
|
const ReactiveDaoWebsocketClient = require("@live-change/dao-websocket").client
|
|
@@ -266,7 +266,7 @@ class Server {
|
|
|
266
266
|
getHttp() {
|
|
267
267
|
if(!this.http) {
|
|
268
268
|
const app = express()
|
|
269
|
-
const sockJsServer = sockjs.createServer({})
|
|
269
|
+
const sockJsServer = sockjs.createServer({ prefix: '/api/sockjs' })
|
|
270
270
|
sockJsServer.on('connection', (conn) => {
|
|
271
271
|
console.log("SOCKJS connection")
|
|
272
272
|
this.apiServer.handleConnection(conn)
|
|
@@ -275,11 +275,11 @@ class Server {
|
|
|
275
275
|
let wsServer = new WebSocketServer({ httpServer: server, autoAcceptConnections: false })
|
|
276
276
|
wsServer.on("request",(request) => {
|
|
277
277
|
console.log("WS URI", request.httpRequest.url, "FROM", request.remoteAddress)
|
|
278
|
-
if(request.httpRequest.url != "/api/ws") return request.reject()
|
|
278
|
+
if(request.httpRequest.url != "/api/ws") return request.reject()
|
|
279
279
|
let serverConnection = new ReactiveDaoWebsocketServer(request)
|
|
280
280
|
this.apiServer.handleConnection(serverConnection)
|
|
281
281
|
})
|
|
282
|
-
sockJsServer.
|
|
282
|
+
sockJsServer.attach(server)
|
|
283
283
|
this.http = {
|
|
284
284
|
app,
|
|
285
285
|
sockJsServer,
|
package/lib/backend.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/db-server",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.86",
|
|
4
4
|
"description": "Database with observable data for live queries",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -30,20 +30,20 @@
|
|
|
30
30
|
"leveldown": "^6.0.0",
|
|
31
31
|
"levelup": "^5.0.1",
|
|
32
32
|
"memdown": "^6.0.0",
|
|
33
|
-
"node-lmdb": "^0.
|
|
33
|
+
"node-lmdb": "^0.8.0",
|
|
34
34
|
"subleveldown": "^5.0.1",
|
|
35
35
|
"tape": "^5.2.2"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@live-change/dao": "^0.3.
|
|
39
|
-
"@live-change/dao-sockjs": "^0.2.
|
|
40
|
-
"@live-change/dao-websocket": "^0.3.
|
|
41
|
-
"@live-change/db": "^0.3.
|
|
42
|
-
"@live-change/db-client": "^0.4.
|
|
43
|
-
"@live-change/db-store-level": "^0.1.
|
|
44
|
-
"@live-change/db-store-lmdb": "^0.1.
|
|
45
|
-
"@live-change/db-store-observable-db": "^0.1.
|
|
46
|
-
"@live-change/db-store-rbtree": "^0.1.
|
|
38
|
+
"@live-change/dao": "^0.3.12",
|
|
39
|
+
"@live-change/dao-sockjs": "^0.2.1",
|
|
40
|
+
"@live-change/dao-websocket": "^0.3.2",
|
|
41
|
+
"@live-change/db": "^0.3.64",
|
|
42
|
+
"@live-change/db-client": "^0.4.71",
|
|
43
|
+
"@live-change/db-store-level": "^0.1.15",
|
|
44
|
+
"@live-change/db-store-lmdb": "^0.1.22",
|
|
45
|
+
"@live-change/db-store-observable-db": "^0.1.3",
|
|
46
|
+
"@live-change/db-store-rbtree": "^0.1.2",
|
|
47
47
|
"express": "^4.17.1",
|
|
48
48
|
"line-reader": "^0.4.0",
|
|
49
49
|
"node-interval-tree": "^1.3.3",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"rimraf": "^3.0.2",
|
|
52
52
|
"rimraf-promise": "^2.0.0",
|
|
53
53
|
"segfault-handler": "^1.3.0",
|
|
54
|
-
"sockjs": "^0.
|
|
54
|
+
"@live-change/sockjs": "^0.4.0-rc.1",
|
|
55
55
|
"websocket": "^1.0.34",
|
|
56
56
|
"yargs": "^17.0.1"
|
|
57
57
|
}
|