Registry / devops / redis-smq-rest-api

redis-smq-rest-api

JSON →
library10.1.2jsnpmunverified

RESTful HTTP interface for RedisSMQ message queue, current stable version 10.1.2. Provides OpenAPI 3 schema and Swagger UI for managing queues, messages, and consumers. Requires Node.js >=20 and matching versions of @redis/client or ioredis, redis-smq, and redis-smq-common. Ships TypeScript types and supports both ESM and CJS. Compared to alternatives like BullMQ's UI, this is the official REST layer for the RedisSMQ ecosystem.

npm install redis-smq-rest-api
INSTALL
IMPORT
SIG · REDIS-SMQ-REST-API
R
redis-smq-rest-api
devopsjavascriptv10.1.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RedisSmqRestApi
import { RedisSmqRestApi } from 'redis-smq-rest-api'
const RedisSmqRestApi = require('redis-smq-rest-api')
Possible ESM-only if package configures 'type': 'module'. Check your project settings.
IRedisSmqRestApiConfig
import type { IRedisSmqRestApiConfig } from 'redis-smq-rest-api'
import { IRedisSmqRestApiConfig } from 'redis-smq-rest-api'
Use type import to avoid runtime errors when exported only as a type.
Default Import (class)
import RedisSmqRestApi from 'redis-smq-rest-api'
const RedisSmqRestApi = require('redis-smq-rest-api').default
Depends on module system; ESM default import works, CJS requires .default

Creates and starts a RedisSMQ REST API server with Redis config from environment variables.

import { RedisSmqRestApi } from 'redis-smq-rest-api'; import { IRedisSmqRestApiConfig } from 'redis-smq-rest-api'; import { IConfig } from 'redis-smq'; const config: IRedisSmqRestApiConfig = { redis: { client: 'redis', options: { host: process.env.REDIS_HOST || '127.0.0.1', port: Number(process.env.REDIS_PORT) || 6379, password: process.env.REDIS_PASSWORD || '', db: 0, }, }, server: { host: '0.0.0.0', port: 3000, }, }; const api = new RedisSmqRestApi(config); api.run().then(() => { console.log('REST API running on port 3000'); }).catch((err) => { console.error('Failed to start:', err); });
Debug
Known issues
breakingVersion 10.0.0 broke compatibility: renamed class from RedisSMQRestApi to RedisSmqRestApi.
fix
Update import to use 'RedisSmqRestApi' and adjust config type to 'IRedisSmqRestApiConfig'.
affects: >=10.0.0
breakingVersion 10.0.0 removed the old constructor signature: now requires a config object with 'redis' and 'server' properties.
fix
Check current documentation for the expected config shape.
affects: >=10.0.0
deprecatedUsing ioredis as client is deprecated; prefer @redis/client.
fix
Install @redis/client and use 'redis' as client type in config.
affects: >=10.0.0
gotchaVersions of redis-smq-rest-api, redis-smq, and redis-smq-common must match exactly.
fix
Pin all three packages to the same version in package.json.
affects: >=10.0.0
gotchaSwagger UI and OpenAPI schema are served at /docs by default; ensure port is accessible in production.
fix
Verify firewall settings and consider disabling in production if not needed.
affects: all
Errors
Common errors & fixes
TypeError: RedisSmqRestApi is not a constructor
Using CommonJS require with ESM default export or wrong import syntax.
fix
Use `const RedisSmqRestApi = require('redis-smq-rest-api').default;` for CJS, or use ESM `import`.
Error: Cannot find module 'redis-smq'
Missing required peer dependency redis-smq.
fix
Install redis-smq: `npm install redis-smq`
Error: Invalid config: 'redis' is required
Config object missing 'redis' property or structure mismatch.
fix
Provide a valid config with redis connection details and server settings.
Error: listen EADDRINUSE :::3000
Port already in use by another process.
fix
Use a different port in config or kill the process using that port.
Upgrade
Version history
10.1.2latest on npm
Audit
Dependencies
@redis/clientoptionalIoredis alternative Redis client for Redis connections
ioredisoptionalAlternative Redis client (choose one)
redis-smqrequiredCore message queue package required
redis-smq-commonrequiredShared components/utilities required
Agent activity
6 hits · last 30 days
node
6
Resources
redis-smq-rest-api — npm install redis-smq-rest-api · libregistry