Skip to content

APIMeter-dev/apimeter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apimeter

Professional rate limiting as a service for Express.JS applications.

Installation

npm install apimeter

Quick Start

const express = require("express");
const apimeter = require("apimeter");

const app = express();

app.use(
  apimeter({
    apiKey: "your-api-key-here",
  })
);

app.get("/api/users", (req, res) => {
  res.json({ users: [] });
});

app.listen(3000);

Getting Your API Key

  1. Sign up at https://www.apimeter.dev
  2. Get your API key from the dashboard
  3. Start with a free 30-day trial

Configuration

app.use(
  apimeter({
    apiKey: "your-api-key", // Required
    clientIdHeader: "x-client-id", // Optional: default 'x-client-id'
  })
);

Features

  • Managed Service - No Redis/Memcached setup required
  • Client-specific Limits - Different limits per client/tenant
  • Real-time Dashboard - Monitor usage and configure limits
  • Fail-safe Design - Continues working if service is down
  • Standard Headers - X-Rate-Limit-Limit and X-Rate-Limit-Remaining

Rate Limit Response

When limits are exceeded:

{
  "error": "Rate limit exceeded",
  "limit": 1000,
  "remaining": 0
}

Plans and full Documentation

Support

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published