1.0.1 • Published 3 years ago

nodejs-middleware-module v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

nodejs-middleware-module

A NodeJS library for logging. It's applicable all node/express services.

You can find API documentation here.


Requirements

For development:


Setup:

Run: yarn install


Running tests

  • ESLint:
    yarn run eslint [yourfile.js]
  • Jest:

Running all tests

yarn test

Running coverage analysis

yarn coverage

Environment variables

Some enviroment variables are available to configure middleware lib. You should set them according to your needs

Logging

middlewares-module uses Telecine's log lib in order to log some internal messages mainly for debugging purposes. Some environment variables are available to configure the logging behaviour for the middlewares-module lib.

NameDescriptionDefault Value
NODE_ENVAs defined by node standards represents if the app is running in development, test or production mode.When set to production it will log to Rapid7 otherwise it will log locallydevelopment
LOG_ENTRIESAPI Key for Rapid7Null
DEBUG0 or 1 indicating if in DEBUG MODE (includes debuggging messages along with info messages)0