boltbeta
v0.0.25
Published
The node agent for Bolt API security.
Downloads
3
Readme
Installation
Currently Bolt's Node Agent supports 3 frameworks:
- Express
- Koa
- Fastify
It can be installed from npm
by running:
npm install boltbeta
Or from yarn
by running:
yarn add boltbeta
Configuration
Express
Bolt can be included as a standard Express Middleware:
import { initExpress as boltbeta } from "boltbeta";
// Or using require
const boltbeta = require("boltbeta").initExpress;
...
const app = express();
...
app.use(
boltbeta(
{
key: <YOUR_BOLT_API_KEY>,
host: "http://<YOUR_BOLT_HOST>:8081",
}
)
);
Koa
Bolt can be included as a standard Koa Middleware:
import { initKoa as boltbeta } from "boltbeta";
// Or using require
const boltbeta = require("boltbeta").initKoa;
...
const app = new Koa();
...
app.use(
boltbeta(
{
key: <YOUR_BOLT_API_KEY>,
host: "http://<YOUR_BOLT_HOST>:8081",
}
)
);
Fastify
Bolt can be included as a standard Fastify plugin:
import { initFastify as boltbeta } from "boltbeta";
// Or using require
const boltbeta = require("boltbeta").initFastify;
...
const fastify = Fastify();
...
fastify.register(
boltbeta(
{
key: <YOUR_BOLT_API_KEY>,
host: "http://<YOUR_BOLT_HOST>:8081",
}
)
);