redis-smq-rest-api 9.0.0-next.16 → 9.0.0-next.17

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 (3) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +8 -152
  3. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -3,6 +3,13 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [9.0.0-next.17](https://github.com/weyoss/redis-smq/compare/v9.0.0-next.16...v9.0.0-next.17) (2025-11-07)
7
+
8
+ ### 📝 Documentation
9
+
10
+ - **redis-smq-rest-api:** restructure README, move details to separate files ([2a5e5d9](https://github.com/weyoss/redis-smq/commit/2a5e5d9a4644e9d1ce490262e7682a83e9dc0e00))
11
+ - standardize documentation links to use relative paths ([fc7c474](https://github.com/weyoss/redis-smq/commit/fc7c474bffbd2160fb9bb8727cec4bbdc5a23dc8))
12
+
6
13
  ## [9.0.0-next.16](https://github.com/weyoss/redis-smq/compare/v9.0.0-next.15...v9.0.0-next.16) (2025-11-05)
7
14
 
8
15
  ### ♻️ Code Refactoring
package/README.md CHANGED
@@ -39,162 +39,18 @@ npm install ioredis --save
39
39
 
40
40
  ## Version Compatibility
41
41
 
42
- ⚠️ Important: Always install matching versions of RedisSMQ packages to ensure compatibility.
42
+ Always install matching versions of RedisSMQ packages to ensure compatibility. See [version compatibility](/packages/redis-smq/docs/version-compatibility.md) for details.
43
43
 
44
- ```bash
45
- npm install redis-smq@x.x.x redis-smq-rest-api@x.x.x redis-smq-common@x.x.x
46
- ```
47
-
48
- See [version compatibility](/packages/redis-smq/docs/version-compatibility.md) for details.
49
-
50
- ## Configuration
51
-
52
- The REST API configuration extends the base [RedisSMQ configuration](/packages/redis-smq/docs/configuration.md) with additional API server settings.
53
-
54
- ### Configuration Options
55
-
56
- ```typescript
57
- export interface IRedisSMQHttpApiConfig extends IRedisSMQConfig {
58
- apiServer?: {
59
- // Port to run the REST API on. Default: 7210
60
- port?: number;
61
-
62
- // Base path to mount the REST API and docs under. Default: '/'
63
- basePath?: string;
64
- };
65
- }
66
- ```
67
-
68
- ### Configuration Examples
69
-
70
- ```typescript
71
- import { ERedisConfigClient, EConsoleLoggerLevel } from 'redis-smq-common';
72
-
73
- const config = {
74
- apiServer: {
75
- port: 7210,
76
- basePath: '/', // API at '/api', Swagger at '/swagger'
77
- },
78
- redis: {
79
- client: ERedisConfigClient.IOREDIS,
80
- options: {
81
- host: '127.0.0.1',
82
- port: 6379,
83
- db: 0,
84
- },
85
- },
86
- logger: {
87
- enabled: true,
88
- options: {
89
- logLevel: EConsoleLoggerLevel.INFO, // or 'INFO'
90
- },
91
- },
92
- };
93
- ```
94
-
95
- ## Programmatic Usage
96
-
97
- The RedisSMQRestApi class can be used as a standalone server or embedded as middleware in an existing Express application.
44
+ ## Documentation
98
45
 
99
- ### Standalone Server
100
-
101
- This mode starts an HTTP server that listens on the configured port.
102
-
103
- ```typescript
104
- import { RedisSMQRestApi } from 'redis-smq-rest-api';
105
- import { ERedisConfigClient } from 'redis-smq-common';
106
-
107
- const api = new RedisSMQRestApi({
108
- apiServer: { port: 7210 },
109
- redis: {
110
- client: ERedisConfigClient.IOREDIS,
111
- options: { host: '127.0.0.1', port: 6379, db: 0 },
112
- },
113
- });
114
-
115
- await api.run();
116
- ```
117
-
118
- ### Embedded Middleware
119
-
120
- To integrate into an existing Express app, instantiate RedisSMQRestApi with false as the second argument to prevent it
121
- from starting its own listener. Then, use getApplication() to get the middleware.
122
-
123
- ```javascript
124
- import express from 'express';
125
- import { RedisSMQRestApi } from 'redis-smq-rest-api';
126
- import { ERedisConfigClient } from 'redis-smq-common';
127
-
128
- const app = express();
129
- const api = new RedisSMQRestApi(
130
- {
131
- apiServer: { basePath: '/api' }, // port is ignored
132
- redis: { client: ERedisConfigClient.IOREDIS },
133
- },
134
- false, // <-- disable listener
135
- );
136
-
137
- const restApiMiddleware = await api.getApplication();
138
- app.use(restApiMiddleware);
139
-
140
- app.listen(3000, () =>
141
- console.log('Host app listening on http://localhost:3000'),
142
- );
143
- ```
144
-
145
- ## Usage from CLI
146
-
147
- The REST API server can be started directly from your terminal after installation.
148
-
149
- ```shell
150
- npx redis-smq-rest-api
151
- ```
152
-
153
- ### CLI Options
154
-
155
- You can override the default configuration using the following command-line arguments:
156
-
157
- ```shell
158
- -p, --port <number> Port to run the REST API on (default: "7210")
159
- -b, --base-path <string> Base path to mount the REST API under (default: "/")
160
- -c, --redis-client <ioredis|redis> Redis client. Valid options are: ioredis, redis. (default: "ioredis")
161
- -r, --redis-host <string> Redis server host (default: "127.0.0.1")
162
- -o, --redis-port <number> Redis server port (default: "6379")
163
- -d, --redis-db <number> Redis database number (default: "0")
164
- -e, --enable-log <0|1> Enable console logging: 0 (disabled), 1 (enabled) (default: "0")
165
- -v, --log-level <0|1|2|3> Log level. Numbers: 0=DEBUG, 1=INFO, 2=WARN, 3=ERROR (default: "1")
166
- -h, --help Display help for command
167
- ```
168
-
169
- ### CLI Examples
170
-
171
- Starting the server on a specific port and connecting to a different Redis instance:
172
-
173
- ```shell
174
- npx redis-smq-rest-api --port 8000 --redis-host 10.0.0.5 --redis-port 6380
175
- ```
176
-
177
- ## API Documentation
178
-
179
- ### Swagger UI
180
-
181
- Access the interactive API documentation at:
182
-
183
- ```text
184
- http://<HOSTNAME>:<PORT>/swagger
185
- ```
186
-
187
- ### OpenAPI Specification
188
-
189
- Download the OpenAPI specification at:
190
-
191
- ```text
192
- http://<HOSTNAME>:<PORT>/swagger/assets/openapi-specs.json
193
- ```
46
+ For in-depth guides and API references, see [the documentation page](docs/README.md):
194
47
 
195
- ## Available Endpoints
48
+ ## Related packages
196
49
 
197
- For detailed endpoint documentation, refer to the Swagger UI.
50
+ - [redis-smq](../redis-smq/README.md): Core message queue
51
+ - [redis-smq-common](../redis-smq-common/README.md): Shared components/utilities
52
+ - [redis-smq-web-server](../redis-smq-web-server/README.md): Static hosting + in-process or proxied API
53
+ - [redis-smq-web-ui](../redis-smq-web-ui/README.md): SPA for monitoring and managing RedisSMQ
198
54
 
199
55
  ## License
200
56
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redis-smq-rest-api",
3
- "version": "9.0.0-next.16",
3
+ "version": "9.0.0-next.17",
4
4
  "description": "REST API for RedisSMQ: OpenAPI 3 schema and Swagger UI for managing queues, messages, and consumers.",
5
5
  "author": "Weyoss <weyoss@protonmail.com>",
6
6
  "license": "MIT",
@@ -68,8 +68,8 @@
68
68
  "peerDependencies": {
69
69
  "@redis/client": "^5",
70
70
  "ioredis": "^5",
71
- "redis-smq": "^9.0.0-next.16",
72
- "redis-smq-common": "^9.0.0-next.16"
71
+ "redis-smq": "^9.0.0-next.17",
72
+ "redis-smq-common": "^9.0.0-next.17"
73
73
  },
74
74
  "peerDependenciesMeta": {
75
75
  "@redis/client": {