Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anytv/runtime-process-handler
Module for wrapping 3rd-party/custom error reporting mechanisms
https://github.com/anytv/runtime-process-handler
Last synced: about 1 month ago
JSON representation
Module for wrapping 3rd-party/custom error reporting mechanisms
- Host: GitHub
- URL: https://github.com/anytv/runtime-process-handler
- Owner: anyTV
- Created: 2019-02-27T08:29:43.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T17:16:31.000Z (about 2 years ago)
- Last Synced: 2024-05-21T07:17:51.169Z (8 months ago)
- Language: JavaScript
- Size: 108 KB
- Stars: 0
- Watchers: 14
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Zoro
Handler for runtime processes and events on NodeJS# Overview
This library provides the following:
1. Error monitoring during runtime processes
- create error listeners for catching all code-based issues during project runtime
- format as message to provide informative reports# Installation
To use this, simply install it on a nodejs project by `npm i runtime-process-handler`# Prerequisite
To be able to know what are the process events you can trigger or start listening to, you may refer to the following reference:
[NodeJS Process](https://nodejs.org/api/process.html)# Usage
1. On your index.js / server.js / app.js, require the package
```javascript
const RuntimeProcessHandler = require('runtime-process-handler');
```
2. Create an instance of the handler
```javascript
let runtimeProcessHandler = new RuntimeProcessHandler(
processInstanceOfYourNodeJsProject, // process
listOfEventsToHandleInArrayFormat, // [ 'processEvent1', 'processEvent2' ... ]
callbackWhenEventsAreTriggered
);
```3. Start the runtime process handler
```javascript
runtimeProcessHandler.start();
```4. (Sample) Your events' callback function
```javascript
function callbackWhenEventsAreTriggered (res) {
sendEmailFunc(res);
}
```