trello-report-js
v1.0.4
Published
Report messages to trello!
Downloads
7
Readme
Trello Report
Report messages to trello!
Example with middleware and function createCard
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"));