generated from kawarimidoll/deno-dev-template
-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
health_check.ts
37 lines (29 loc) · 763 Bytes
/
health_check.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { ky } from "./deps.ts";
const prefixUrl = "https://github-contributions-api.deno.dev";
const k = ky.create({ prefixUrl });
try {
console.log("Root");
await k("").text();
console.log("User");
await k("kawarimidoll").text();
console.log("Text");
await k("kawarimidoll.text").text();
console.log("Json");
await k("kawarimidoll.json").text();
console.log("Term");
await k("kawarimidoll.term").text();
console.log("Svg");
await k("kawarimidoll.svg").text();
console.log("Parameters");
await k("kawarimidoll.svg", {
searchParams: {
scheme: "random",
"no-total": true,
bg: "123abc",
},
}).text();
console.log("System all green!");
} catch (error) {
console.error(`${error}`);
Deno.exit(1);
}