Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raphaelkieling/trello-report
:sheep: Report errors in express to trello.
https://github.com/raphaelkieling/trello-report
Last synced: 2 days ago
JSON representation
:sheep: Report errors in express to trello.
- Host: GitHub
- URL: https://github.com/raphaelkieling/trello-report
- Owner: raphaelkieling
- License: mit
- Created: 2018-05-03T15:10:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-05-04T16:13:33.000Z (over 6 years ago)
- Last Synced: 2024-10-03T19:04:47.889Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 118 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Trello Report
Report messages to trello!
![Travis CI](https://travis-ci.org/raphaelkieling/trello-report.svg?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/raphaelkieling/trello-report/badge.svg?branch=master)](https://coveralls.io/github/raphaelkieling/trello-report?branch=master)## Installation
With **npm**
```sh
npm install --save trello-report-js
```With **yarn**
```sh
yarn add --exact trello-report-js
```## Example with middleware and function createCard
```javascript
const server = require("express")();
const trelloReport = require("../lib/trello_report");let trelloReportMiddleware = new trelloReport({
your_key: "YOUR_KEY",
token: "YOUR_TOKEN",
id_list: "ID_LIST"
});server.get("", async (req, res) => {
try {
throw new Error("Server error");
} catch (e) {
trelloReportMiddleware
.createCard("Erro no get do software")
.then(console.log("Card sended"));res.status(500).send("ERROR");
}
});server.use(trelloReportMiddleware.middleware());
server.listen(3000, () => console.log("listen in 3000"));
```## Test
```sh
npm test
```Precommit always run npm test. **Test your code**.