ws-stomp 1.1.1 → 1.1.2

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.
Files changed (2) hide show
  1. package/README.md +4 -4
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  [![Alt](https://img.shields.io/npm/dt/ws-stomp?style=flat-square)](https://npmcharts.com/compare/ws-stomp?minimal=true)
5
5
  ![Alt](https://img.shields.io/github/license/mivui/ws-stomp?style=flat-square)
6
6
 
7
- ## ws-stomp is a simple nodejs ws stomp server
7
+ ## ws-stomp is a simple Node.js server based on websocket STOMP.
8
8
 
9
9
  ### install
10
10
 
@@ -30,7 +30,7 @@ server.listen(3000);
30
30
  import wsstomp from 'ws-stomp';
31
31
 
32
32
  function publish() {
33
- wsstomp.send('/topic/something', JSON.stringify({ name: 'example' }), { token: 'example' });
33
+ wsstomp.send('/topic/something', JSON.stringify({ name: 'name' }), { token: 'token' });
34
34
  }
35
35
  ```
36
36
 
@@ -69,7 +69,7 @@ app.get('/send', (_, res) => {
69
69
  wsstomp.send('/topic/something', 'payload');
70
70
  res.status(200).json({});
71
71
  });
72
- const server = app.listen(8080);
72
+ const server = app.listen(3000);
73
73
  wsstomp.server(server, '/ws');
74
74
  wsstomp.subscribe('/topic/greetings', (message) => {
75
75
  console.log(message.body);
@@ -82,7 +82,7 @@ wsstomp.subscribe('/topic/greetings', (message) => {
82
82
  import { Client } from '@stomp/stompjs';
83
83
 
84
84
  const client = new Client({
85
- brokerURL: 'ws://localhost:8080/ws',
85
+ brokerURL: 'ws://lcalhost:3000/ws',
86
86
  onConnect: () => {
87
87
  client.publish({ destination: '/topic/greetings', body: 'Hello World!' });
88
88
  client.subscribe('/topic/something', (message) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ws-stomp",
3
- "version": "1.1.1",
4
- "description": "ws-stomp",
3
+ "version": "1.1.2",
4
+ "description": "ws-stomp is a simple Node.js server based on websocket STOMP.",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.esm.js",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "author": "mivui",
42
42
  "license": "MIT",
43
- "keywords": ["stomp", "ws", "node"],
43
+ "keywords": ["stomp", "ws", "node","websocket"],
44
44
  "repository": {
45
45
  "type": "git",
46
46
  "url": "git+https://github.com/mivui/node-ws-stomp.git"