3.2.9 • Published 26 days ago

apitoolkit-js v3.2.9

Weekly downloads
-
License
ISC
Repository
github
Last release
26 days ago

APIToolkit nodejs integration.

The NODEJS SDK integration guide for APIToolkit. It monitors incoming traffic, gathers the requests and sends the request to the apitoolkit servers.

Installation

Run the following command to install the package from your projects root:

npm install apitoolkit-js

Project setup

Intialize apitoolkit into your project is as simple as :

const apitoolkitClient = await APIToolkit.initialize("<API-KEY>")

where is the apikey which can be generated from your apitoolkit.io account.

Next, you can use the apitoolkit middleware for your respective routing library.

Eg, for express JS, your final code would look like:

app.use(apitoolkitClient.expressMiddleware);

where app is your express js instance.

Your final could might look something like this:

const express = require('express')
const app = express()
const port = 3000

const apitoolkitClient = await APIToolkit.initialize("<API-KEY>")
app.use(apitoolkitClient.expressMiddleware.bind(apitoolkitClient));

app.get('/', (req, res) => {
  res.send('Hello World!')
})

app.listen(port, () => {
  console.log(`Example app listening on port ${port}`)
})
3.2.6

27 days ago

3.2.5

27 days ago

3.2.4

27 days ago

3.2.9

26 days ago

3.2.8

27 days ago

3.2.7

27 days ago

3.1.3

1 month ago

3.2.3

1 month ago

3.0.3

2 months ago

3.0.2

2 months ago

2.0.2

5 months ago

2.0.1

5 months ago

2.0.0

5 months ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago