teams-reporter
v1.0.5
Published
The purpose of this is to be able to send back logging information to a teams channel via a webhook.
Downloads
13
Maintainers
Readme
Teams Reporter
The purpose of this is to be able to send back logging information to a teams channel via a webhook.
Assumptions
You are using Teams You know how to create a webhook for a teams channel
Implementation
Install the npm module
npm i teams-reporter
add your require const
const {captureResponseBodyMiddleware} = require("teams-reporter");
add the use to your express engine
server.app.use(captureResponseBodyMiddleware);
set your .env file variables
example
To use this you will need to allow your express server to use the capture function.
//API Builder
server.app.use(captureResponseBodyMiddleware);
//Plan Express
server.use(captureResponseBodyMiddleware);
const express = require("express");
const { captureResponseBodyMiddleware } = require("teams-reporter");
const app = express();
app.use(captureResponseBodyMiddleware);
// Define your routes here
app.listen(3000, () => {
console.log("Server is running on port 3000");
});
Required Environment Variables
TEAMS_HOOKS=https://www.yourteam.com/webhook/....
TEAMS_LOGO=https://media2.com/mylogo.png
TEAMS_TITLE=Card Title