akita-express-middleware
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Akita daemon client for Express.js applications

This provides an Express.js middleware implementation of a client for the Akita daemon. When used with an Express.js application, this middleware allows logging of the application's requests and responses to be controlled from Akita's web console.

Installation

$ npm install akita-express-middleware

Usage

To add Akita to your Express.js application, import akitaMW from akita-express-middleware and add it to your middleware stack, while specifying the location of your Akita daemon and the Akita service name associated with your application.

For example:

// app.ts
import express from 'express';

// STEP 1: Import `akitaMW` to make it available to your application.
import akitaMW from 'akita-express-middleware';

const app = express();

// STEP 2: Add `akitaMW` to your middleware stack, preferably before all other
// middleware.
app.use(akitaMW({
  daemonHost: "localhost:50800",
  serviceName: "my-service",
}));

Development

After checking out the repo, run npm install to install dependencies.

  • To build, use npm run build.
  • To install this locally into an Express.js application, make sure you have this repository checked out and compiled. Then run npm install path/to/express-middleware from the application directory. If you make any changes to this middleware, you will have to recompile the middleware before the application will pick up the changes.
  • To publish as a public unscoped package, bump the version number in package.json and run npm publish.

Dependents (1)

Package Sidebar

Install

npm i akita-express-middleware

Weekly Downloads

0

Version

1.0.1

License

Apache-2.0

Unpacked Size

67.1 kB

Total Files

31

Last publish

Collaborators

  • akita_software
  • akitacole
  • lazyvalue