1.0.2 • Published 6 years ago

@maxdome/redis-flushall v1.0.2

Weekly downloads
1
License
-
Repository
-
Last release
6 years ago

Usage

The controller

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

Only the flushall

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

Swagger

paths:
  /debug/redis-flushall:
    post:
      summary: "Remove all key/value pairs from the redis"
      parameters:
        - name: secret
          description: "Authorization for the flushall"
          in: query
          type: string
      responses:
        204:
          description: "OK"
        403:
          description: "Missing or incorrect secret"
        500:
          description: "Internal Server Error"