-
Notifications
You must be signed in to change notification settings - Fork 35
/
main.ts
25 lines (17 loc) 路 614 Bytes
/
main.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
import { serve } from "https://deno.land/[email protected]/http/server.ts";
serve(async (req: Request) => {
const userAgent = req.headers.get("User-Agent") || "";
if (userAgent.includes("PowerShell")) {
return new Response(await Deno.readFile("./install.ps1"));
}
if (userAgent.includes("curl")) {
return new Response(await Deno.readFile("./install.sh"));
}
return new Response(`
Deno Version Manager - Easy way to manage multiple active deno versions.
Install With Shell:
curl -fsSL https://dvm.deno.dev | sh
Install With PowerShell:
irm https://dvm.deno.dev | iex
`);
});