for NodeJS / Express based applications
Protomodule is a set of common practices which span from coding over CI/CD to production deployments. Every utility within Protomodule is able to provide core functionality as a standalone tool. All Protomodule utilities are interoperable to get the most out of your DevOps pipeline with minimum effort.
Probe is the NodeJS module to integrate Protomodules principles into NodeJS / Express based applications.
🚨 This library is under heavy development. Be sure to check back for breaking changes in future releases.
Install Protomodule | Probe by running:
$ npm install --save @protomodule/probe
Integrate Protomodule | Probe into your express setup with a single line of code:
import { useProtomoduleIn } from "@protomodule/probe"
const app = express()
useProtomoduleIn(app)
// Add your routes here
Protomodule | Probe provides two kinds of features:
Modules are automatically applied middlewares for express. The may be deactivated by configuration.
Must be explicitly used.
Modules can be configured in the useProtomoduleIn(...)
call. First parameter of this function takes an Express app. Through the rest arguments an arbitrary number of options can be specified.
You can pass in plain objects or use predefined options imported from @protomodule/probe
.
Be aware that all options are merged in the following priority:
- Specific environment variables overwrite
- Options as parameters (parameters are merged from first to last)
- Default fallback values
Example configuration
import { useProtomoduleIn, withoutRequestLogging } from "@protomodule/probe"
...
useProtomoduleIn(app, withoutRequestLogging)
Read more about available options in the options section.
Please use pull requests for new feature suggestions. During development run yarn watch
to automatically re-compile on code changes. For releases to NPM run:
$ yarn build
$ yarn release
This project is licensed under the terms of the MIT license. See the LICENSE file.
This project is in no way affiliated with Apple Inc or Google Inc. This project is open source under the MIT license, which means you have full access to the source code and can modify it to fit your own needs.