deno.land / x / denon@2.5.0 / examples / simple.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
import { green, red } from "https://deno.land/std/fmt/colors.ts";import { delay } from "https://deno.land/std/async/delay.ts";
console.log(Deno.pid, green("New process, new Hello World!"));
console.log( Deno.pid, green("env.SECRET_ENV_VARIABLE:"), Deno.env.get("SECRET_ENV_VARIABLE"),);
console.log(Deno.pid, green("args:"), Deno.args);
let i = 50;
while (i > 0) { await delay(1000); console.log(Deno.pid, red(`Execution #${i}!`));
if (--i % 10 === 0) { throw new Error("Oh no."); }}
denon

Version Info

Tagged at
2 years ago

External Dependencies

No external dependencies 🎉