0.0.1 • Published 1 year ago

harmono v0.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Harmono

Gain complete visibility and control over your APIs. Keep your APIs safe, secure, and optimized with real-time monitoring, automatic alerts, and intelligent threat detection.

Installation

Install the Harmono library via npm:

npm install harmono

Usage

To use Harmono in your project, import and initialize it with your API key, host, and optionally, the environment (defaults to "development").

Express

ESM

import express from "express";
import {HarmonoExpress} from "harmono";

const app = express();
const monitor = HarmonoExpress({key: "<your-api-key>", host: "<your-host>", env: "production"});

app.use(monitor);

CJS

const express = require("express");
const {HarmonoExpress} = require("harmono");

const app = express();
const monitor = HarmonoExpress({key: "<your-api-key>", host: "<your-host>", env: "production"});

app.use(monitor);

Koa

ESM

import Koa from "koa";
import {HarmonoKoa} from "harmono";

const app = new Koa();
const monitor = HarmonoKoa({key: "<your-api-key>", host: "<your-host>", env: "production"});

app.use(monitor);

CJS

const Koa = require("koa");
const {HarmonoKoa} = require("harmono");

const app = new Koa();
const monitor = HarmonoKoa({key: "<your-api-key>", host: "<your-host>", env: "production"});

app.use(monitor);

Fastify

ESM

import fastify from "fastify";
import {HarmonoFastify} from "harmono";

const app = fastify();
const monitor = HarmonoFastify({key: "<your-api-key>", host: "<your-host>", env: "production"});

app.register(monitor);

CJS

const fastify = require("fastify");
const {HarmonoFastify} = require("harmono");

const app = fastify();
const monitor = HarmonoFastify({key: "<your-api-key>", host: "<your-host>", env: "production"});

app.register(monitor);

In the env parameter, specify the environment ("production", "development", etc.), with the default being "development" if not provided.

0.0.1

1 year ago