@pillarwallet/common-middleware

0.11.156 • Public • Published

Common Middleware

Common middleware for Node.js apps

Available Middleware

Exported functions accept an optional options object and return ExpressJS middleware.

Install

Create a local .npmrc file with Artifactory authentication. Where username and password are your own Artifactory credentials, run:

curl -u username:password https://pillarproject.jfrog.io/pillarproject/api/npm/auth >> .npmrc

Install the most recent exact version and save to your dependencies.

npm i -PE @pillarwallet/common-middleware

Access Control Headers

Common access control headers.

Example usage:

const { accessControlHeaders } = require('@pillarwallet/common-middleware');

app.use(accessControlHeaders());

Error Handler

Error handling middleware that handles and accepts Boom error objects.

Accepts an optional Bunyan logger such as Common Logger.

Example usage:

const { errorHandler } = require('@pillarwallet/common-middleware');

app.use(errorHandler({ logger }));

Test

npm test

Readme

Keywords

none

Package Sidebar

Install

npm i @pillarwallet/common-middleware

Weekly Downloads

9

Version

0.11.156

License

ISC

Unpacked Size

63 kB

Total Files

22

Last publish

Collaborators

  • pillarproject
  • rafaelcidade