@swarmjs/monitoring
v1.0.3
Published
Monitoring plugin for SwarmJS
Downloads
7
Readme
Table Of Contents
About The Project
The Monitoring plugin will watch every request done on your API, log them in memory, and provide an endpoint to retrieve analytics.
Built With
- TypeScript@4
Getting Started
Installation
yarn add @swarmjs/monitoring
or
npm install --save @swarmjs/monitoring
Usage
import { Swarm } from '@swarmjs/core'
import { MonitoringPlugin } from '@swarmjs/monitoring'
// Create instance
const app = new Swarm()
// Use the plugin
app.use(MonitoringPlugin, {
controllerName: 'MonitoringPlugin', // Customize controller name into your API
prefix: '/__monitoring__', // Customize route to access to analytics
access: null // Restricts access to logged users, based on SwarmJS ACL
})
Roadmap
See the open issues for a list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- If you have suggestions for adding or removing projects, feel free to open an issue to discuss it, or directly create a pull request after you edit the README.md file with necessary changes.
- Please make sure you check your spelling and grammar.
- Create individual PR for each suggestion.
- Please also read through the Code Of Conduct before posting your first idea as well.
Creating A Pull Request
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE for more information.