Last active
January 3, 2022 09:22
-
-
Save ismail1432/7d715c908c8d595c0f41d8b8e31a1069 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// config.php | |
// config can be done with constant | |
const ENDPOINT_TO_CHECK = ['www.google.com', 'http://127.0.0.1:8000']; | |
const SLACK_CHANNEL = 'monitoring-web-app'; // channel where post the message | |
const SLACK_URL = 'https://slack.com/api/chat.postMessage'; | |
const SLACK_TOKEN= 'token given by slack'; | |
// config with function to fetch env var... | |
function getSlackUrl(): string | |
{ | |
return SLACK_URL; | |
} | |
function getEndPointToCheck(): array | |
{ | |
return ENDPOINT_TO_CHECK; | |
} | |
function getSlackToken(): string | |
{ | |
return SLACK_TOKEN; | |
} | |
function getSlackChannel(): string | |
{ | |
return SLACK_CHANNEL; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please fix typo:
monitoring-web-app
.