Skip to content

Commit 692fe10

Browse files
committed
docs: slack environment variables
1 parent cbb56d6 commit 692fe10

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ This application can be configured using the following environment variables:
1111
- `VERBOSE_MODE`: The verbose mode, if set to `"true"`, will print the result of each check in the logs (default: `"false"`)
1212
- `SHOW_ERRORS`: If set to `"true"`; it will display more details to the error in the logs (default: `"true"`)
1313
- `PING_INTERVAL`: The interval of time in milliseconds where the ping to the MongoDB instance is done (default: `"1000"`)
14+
- `SLACK_TOKEN`: The Slack token used to send messages to Slack (default: `"secret-token"`)
15+
- `SLACK_CHANNEL`: The Slack channel where the messages will be sent (default: `"mongo-alerts"`)

index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ts-check
12
import "dotenv/config";
23
import { MongoClient } from "mongodb";
34
import { WebClient } from "@slack/web-api";
@@ -6,7 +7,7 @@ import Fastify from "fastify";
67
/**
78
* Check if the value is defined and return the default value if not as boolean.
89
*
9-
* @param {string} value
10+
* @param {string | undefined} value
1011
* @param {boolean} defaultValue
1112
* @returns {boolean}
1213
*/

0 commit comments

Comments
 (0)