Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simonecorsi/pm2-process-events
Get all PM2 process events
https://github.com/simonecorsi/pm2-process-events
Last synced: 24 days ago
JSON representation
Get all PM2 process events
- Host: GitHub
- URL: https://github.com/simonecorsi/pm2-process-events
- Owner: simonecorsi
- License: mit
- Created: 2022-11-17T08:58:09.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-28T15:39:41.000Z (about 1 month ago)
- Last Synced: 2024-10-03T05:11:00.720Z (about 1 month ago)
- Language: JavaScript
- Size: 3.68 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# pm2-process-events
> Emits all process events from pm2 unix socket
This packages is used to asyncronously emit all pm2 process events.
- [Installation](#installation)
- [Usage](#usage)
- [Options](#options)
- [Contributing](#contributing)
- [License](#license)
- [Contact](#contact)## Installation
```sh
npm i --save pm2-process-events
# OR
yarn add pm2-process-events
```## Usage
```js
import Pm2ProcessEvents from 'pm2-process-events';const pm2Events = new Pm2ProcessEvents(
// pm2.sock location, defaults to:
`${process.env.HOME}/.pm2/pub.sock`
);pm2Events.on('*', ({ namespace, payload }) => {
console.log(namespace, payload);
});
```You can filter events using `wildcards` matching, eg: `log:*`
```ts
// data format
{
event: string;
payload: any;
}
```## Options
## Contributing
Project is pretty simple and straight forward for what is my needs, but if you have any idea you're welcome.
This projects uses [commitlint](https://commitlint.js.org/) with Angular configuration so be sure to use standard commit format or PR won't be accepted.
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'feat(scope): some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request## License
Distributed under the MIT License. See `LICENSE` for more information.
## Contact
Simone Corsi - [@im_simonecorsi](https://twitter.com/im_simonecorsi)