npac
v2.1.14
Published
A lightweight Ports and Adapters Container for Node
Downloads
310
Readme
npac
npac
is a lightweight Ports and Adapters Container for applications running on Node.js platform.
This module provides a framework for applications to:
- clearly separate the infrastructure code from business domain code,
- centrally manage configuration (defaults, environment, config file, cli),
- make application life-cycle management (startup, shutdown, signal handling),
- provide built-in, configurable logging and monitoring capabilities.
Read first the documentation to understand how it works.
Study the npac-example-cli example project, which demonstrates how to use npac to implement a simple command line utility.
See the API documentation and the unit tests for further details on how to use this library.
Installation
Run the install command:
npm install --save npac
Development
During the development to create the dist package, run either:
npm run build
or use
npm run test:watch
Update the documentation:
npm run docs
Check the source code:
npm run test
npm run lint
Gain test coverage report:
npm run coverage
References and further readings
- Hexagonal Architecture (a.k.a. Ports and Adapters) by Alistair Cockburn
- The Clean Architecture
- Clean Architecture design in NodeJS
- Ports-And-Adapters / Hexagonal Architecture by Garfixia software Architectures
- Node.js Best Practices
- Checklist: Node.JS production best practices
This project was generated from the es6-module-archetype by the kickoff utility.