@only-chat/rabbitmq-queue 0.2.0-beta.27 → 0.2.0-beta.28
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/README.md +22 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -1,2 +1,23 @@
|
|
|
1
1
|
# only-chat
|
|
2
|
-
This is a RabbitMQ queue implementation for only-chat.
|
|
2
|
+
This is a RabbitMQ queue implementation for only-chat.
|
|
3
|
+
|
|
4
|
+
# Get started
|
|
5
|
+
|
|
6
|
+
```shell
|
|
7
|
+
npm i --save @only-chat/rabbitmq-queue
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
```typescript
|
|
11
|
+
import { initialize as initializeQueue } from '@only-chat/rabbitmq-queue'
|
|
12
|
+
import { initialize as initializeClient, WsClient } from '@only-chat/client'
|
|
13
|
+
|
|
14
|
+
...
|
|
15
|
+
|
|
16
|
+
const queue = await initializeQueue(queueConfig)
|
|
17
|
+
|
|
18
|
+
initializeClient({queue, store, userStore, instanceId}, logger)
|
|
19
|
+
|
|
20
|
+
const ws = new WebSocketServer({ host, port })
|
|
21
|
+
|
|
22
|
+
ws.on('connection', s => new WsClient(s))
|
|
23
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@only-chat/rabbitmq-queue",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.28",
|
|
4
4
|
"description": "RabbitMQ queue for only-chat",
|
|
5
5
|
"homepage": "https://github.com/only-chat/node-backend/packages/queues/rabbitmq",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,11 +16,14 @@
|
|
|
16
16
|
},
|
|
17
17
|
"author": "only-chat",
|
|
18
18
|
"license": "MIT",
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"amqplib": "^0.10.9"
|
|
21
|
+
},
|
|
19
22
|
"devDependencies": {
|
|
20
|
-
"@only-chat/types": "0.2.0-beta.
|
|
21
|
-
"@types/amqplib": "^0.10.
|
|
22
|
-
"@types/node": "^25.
|
|
23
|
-
"typescript": "^5.9.
|
|
23
|
+
"@only-chat/types": "0.2.0-beta.28",
|
|
24
|
+
"@types/amqplib": "^0.10.8",
|
|
25
|
+
"@types/node": "^25.2.3",
|
|
26
|
+
"typescript": "^5.9.3"
|
|
24
27
|
},
|
|
25
28
|
"files": [
|
|
26
29
|
"dist/"
|
|
@@ -29,8 +32,5 @@
|
|
|
29
32
|
"node",
|
|
30
33
|
"only-chat",
|
|
31
34
|
"rabbitmq"
|
|
32
|
-
]
|
|
33
|
-
|
|
34
|
-
"amqplib": "^0.10.4"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
35
|
+
]
|
|
36
|
+
}
|