Skip to content

Simple-API-Management/nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple API Management Node.js middleware

Simple API Management Logo Simple API Management Logo

Installation

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

$ npm install simpleapimanagement

Usage

const simpleAPIManagement = require('simpleapimanagement');

var options = {
  apiKey: 'add your API key here',
  rateLimits: false, // default
  metrics: true, // default
  // [OPTIONAL] 
  exclude: ['authorization'] 
  // [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));
Option Use
apiKey required: true Get your API key from our app https://app.simpleapimanagement.com. Your API key will be displayed after signign up and creating an API.
rateLimits default: false If true, configured rate limits will be checked. For more information please see: https://simpleapimanagement.com/ratelimits
metrics default: true By default, we send metics to our service. Metrics consists of various informations like the path, method, statusCode, request, response. This information is used to aggregate your APIs metrics. For more information please see: https://simpleapimanagement.com/metrics
exclude optional An array of keys from your API requests and responses headers as well as bodies that you wish to exclude from sending to Simple API Management. We recommend to exclude any sensitive information.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published