@maxdome/redis-flushdb

1.0.3 • Public • Published

Usage

The controller

if (process.env.REDIS_FLUSHDB_SECRET) {
  app.post('/debug/redis-flushdb', require('@maxdome/redis-flushdb').controller({
    redis,
    secret: process.env.REDIS_FLUSHDB_SECRET,
  }));
}

Only the flushdb

require('@maxdome/redis-flushdb')({ redis });

Swagger

paths:
  /debug/redis-flushdb:
    post:
      summary: "Remove all key/value pairs from a redis database"
      parameters:
        - name: secret
          description: "Secret for the flushdb"
          in: query
          type: string
          required: true
        - name: db
          description: "Database which gets flushed (optional, default: the default connected one gets flushed)"
          in: query
          type: string
      responses:
        204:
          description: "OK"
        403:
          description: "Missing or incorrect secret"
        500:
          description: "Internal Server Error"

Readme

Keywords

none

Package Sidebar

Install

npm i @maxdome/redis-flushdb

Weekly Downloads

5

Version

1.0.3

License

none

Unpacked Size

7.57 kB

Total Files

5

Last publish

Collaborators

  • dragonnodejs
  • sharaal
  • fabsrc
  • markusz
  • mxdbv
  • csaba.lorincz
  • goexrock
  • dimified