diff --git a/uptime.config.ts b/uptime.config.ts index b0d8f6a..7cd1996 100644 --- a/uptime.config.ts +++ b/uptime.config.ts @@ -15,10 +15,9 @@ const config = { }, callback: async (statusChangeMsg: string) => { // Write any typescript here - // Example `statusChangeMsg` string: + // Example `statusChangeMsg` string: // "❌My Blog went down at 2023/11/18 14:08:59 with error Timeout after 10000ms" // "✔️My Blog came back up at 2023/11/18 14:10:48 after 2 minutes of downtime" - // Example: // await fetch('https://api.example.com/callback?msg=' + statusChangeMsg) }, @@ -34,19 +33,19 @@ const config = { method: 'POST', // `target` is a valid URL target: 'https://example.com', - // [OPTIONAL] `expectedCode` is an array of acceptable HTTP response codes, if not specified, default to 2xx - expectedCode: [200], + // [OPTIONAL] `expectedCodes` is an array of acceptable HTTP response codes, if not specified, default to 2xx + expectedCodes: [200], // [OPTIONAL] `timeout` in millisecond, if not specified, default to 10000 timeout: 10000, // [OPTIONAL] headers to be sent headers: { 'User-Agent': 'Uptimeflare', - 'Authorization': 'Bearer YOUR_TOKEN_HERE' + Authorization: 'Bearer YOUR_TOKEN_HERE', }, // [OPTIONAL] body to be sent - body: "Hello, world!", + body: 'Hello, world!', // [OPTIONAL] if specified, the response must contains the keyword to be considered as operational. - responseKeyword: "success" + responseKeyword: 'success', }, // Example TCP Monitor { @@ -56,9 +55,9 @@ const config = { method: 'TCP_PING', // `target` should be `host:port` for tcp monitors target: '1.2.3.4:22', - timeout: 5000 - } - ] + timeout: 5000, + }, + ], } // Don't forget this, otherwise compilation fails.