📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

redis-smq-rest-api

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redis-smq-rest-api

A RESTful API for RedisSMQ

8.2.1
latest
Source
npm
Version published
Weekly downloads
100
-68.25%
Maintainers
1
Weekly downloads
 
Created
Source

RedisSMQ REST API

Latest Release Code Coverage

RedisSMQ REST API provides an HTTP interface enabling any web-capable application to interact with the RedisSMQ message queue using a RESTful API.

Features

  • 🚀 Clean and efficient implementation
  • ✅ Strict request/response validation using JSON Schema
  • 📚 Native OpenAPI v3 support and Swagger UI
  • 🧪 90%+ code coverage with extensive testing
  • 📦 Support for both ESM & CJS modules

Prerequisites

Installation

# Using npm
npm install redis-smq-rest-api --save

# Using yarn
yarn add redis-smq-rest-api

# Using pnpm
pnpm add redis-smq-rest-api

Version Compatibility

⚠️ Important: Always install matching versions of RedisSMQ packages to ensure compatibility.

npm install redis-smq@x.x.x redis-smq-rest-api@x.x.x redis-smq-common@x.x.x

See version compatibility for details.

Configuration

The REST API configuration extends the base RedisSMQ configuration with additional API server settings.

Configuration Options

export type THttpApiConfig = {
  port?: number;
  host?: string;
  basePath?: string;
};

export interface IRedisSMQHttpApiConfig extends IRedisSMQConfig {
  apiServer?: THttpApiConfig;
}

Configuration Examples

import { RedisSmqRestApi } from 'redis-smq-rest-api';

// Basic configuration
const basicConfig: IRedisSMQHttpApiConfig = {
  redis: {
    client: 'ioredis',
    options: {
      host: '127.0.0.1',
      port: 6379,
    },
  },
  apiServer: {
    host: '127.0.0.1',
    port: 7210,
  },
};

Usage

import { RedisSmqRestApi } from 'redis-smq-rest-api';

const config: IRedisSMQHttpApiConfig = {
  redis: {
    client: ERedisConfigClient.IOREDIS,
    options: {
      host: '127.0.0.1',
      port: 6379,
    },
  },
  apiServer: {
    host: '127.0.0.1',
    port: 7210,
  },
};

const apiServer = new RedisSmqRestApi(config);
apiServer.run();

API Documentation

Swagger UI

Access the interactive API documentation at:

http://<HOSTNAME>:<PORT>/docs

OpenAPI Specification

Download the OpenAPI specification at:

http://<HOSTNAME>:<PORT>/assets/openapi-specs.json

Available Endpoints

For detailed endpoint documentation, refer to the Swagger UI.

License

This project is licensed under is released under the MIT License.

Keywords

redis

FAQs

Package last updated on 22 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts