0.6.0 • Published 4 years ago

simple-api-management-nodejs v0.6.0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

Simple API Management Logo

Simple API Management Node.js middleware

Installation

This is a Node.js module available through the npm registry.

$ npm install simple-api-management-nodejs

Usage

Get your API key from our Simple API Management UI. your API key will be displayed after signign up and creating an API.

const simpleAPIManagement = require('simple-api-management-nodejs');

var options = {
  apiKey: 'add your API key here',
  rateLimits: true, // default
  metrics: true, // default
  // [OPTIONAL] 
  // identifier can be used to apply rate limits for specific attributes like ip or user
  identifier: function (req, res) { 
    if (req.user) {
      return req.user.id;
    }
    return undefined;
  },
};

app.use(simpleAPIManagement(options));
0.6.0

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago