0.0.13 • Published 12 months ago

@apitraffic/express v0.0.13

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

ApiTraffic helps engineering teams optimize their API implemenations.

How ApiTraffic Works

Once you’ve integrated the ApiTraffic SDK into your application, each request/response will be sent to the ApiTraffic, processed, and will then appear within your desired bucket.

From within your ApiTraffic account you will see real-time requests to your API, API analytics, the load size of the response, etc.

Visit our knowledgebase for the complete documentation.

Get Started

  1. Sign in to ApiTraffic.
  2. Setup the SDK for your application.

Install the SDK

npm i @apitraffic/express --save

Add Code To Application

const express = require('express');
const apiTraffic = require('@apitraffic/express')
const app = express();

app.use(apiTraffic());

Configuration

There are a two different methods for configuring the ApiTraffic SDK: 1. Parameters passed into the apiTraffic() function 2. Setting values as environment variables

These methods are not mutually exclusive, if for whatever reason you need to sent some as parameters and some as environment variables, it is ok they can be mixed.

If the same variable is set in both places, the parameters that are passed in will always supercede the environment variables.

Options

Function ParamEnvironment VariableRequiredTypeDetails
tokenAPI_TRAFFIC_TOKENYesStringIngest token provided from your ApiTraffic account.
bucketAPI_TRAFFIC_BUCKETYesStringThe bucket the data should be sent to when ingested.
interceptOutboundAPI_TRAFFIC_INTERCEPT_OUTBOUNDBooleanIf outbound requests should be intercepted. This requires node 14 or above. (Default: true)

Sample Application

A working sample has been provided in this repository. View the README for the sample application for details on how to run it.

0.0.10

12 months ago

0.0.11

12 months ago

0.0.12

12 months ago

0.0.13

12 months ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.5

1 year ago

0.0.3

1 year ago

0.0.1

1 year ago