1.0.5 • Published 1 month ago

teams-reporter v1.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
1 month ago

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
1.0.5

1 month ago

1.0.4

1 month ago

1.0.3

2 months ago

1.0.2

2 months ago

1.0.1

2 months ago

1.0.0

2 months ago