summaryrefslogtreecommitdiff
path: root/tests/specs/serve/conn_info/main.ts
blob: dbc1b7f0702f3b653fac98654ab5c9563509a520 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
(async () => {
  for (let i = 0; i < 1000; i++) {
    try {
      const resp = await fetch("http://localhost:12468/");
      Deno.exit(0);
    } catch {
      await new Promise((r) => setTimeout(r, 10));
    }
  }

  Deno.exit(2);
})();

export default {
  fetch(request, connInfo) {
    console.log(connInfo);
    return new Response("Hello world!");
  },
} satisfies Deno.ServeDefaultExport;