1.0.1 • Published 3 years ago

akita-express-middleware v1.0.1

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
3 years ago

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.
1.0.1

3 years ago

1.0.0

3 years ago

0.3.0

3 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago