Installation

Installation

Install guardo from npm. Nodemailer is bundled, so email delivery works out of the box. Install ioredis separately only if you need Redis in production.

# Core package
npm install guardo
 
# Optional: Redis adapter for production
npm install ioredis

Peer dependencies: express, fastify, next, and ioredis are all optional. Install only what you use - guardo never imports them unless you call the matching adapter or middleware.

Requirements

RequirementVersion
Node.js18 or newer
TypeScript5.x (optional, but types ship with the package)

guardo is written in TypeScript and ships its own type declarations - no @types/guardo needed.