Deno
A new way to JavaScriptLinux & Mac | Windows | |
---|---|---|
deno | ||
deno_std | ||
deno_install | ||
registry |
Install #
Using Shell:
curl -fsSL https://deno.land/x/install/install.sh | sh
Or using PowerShell:
iwr https://deno.land/x/install/install.ps1 | iex
See deno_install for more installation options.
Example #
Try running a simple program:
deno https://deno.land/welcome.ts
Or a more complex one:
import { serve } from "https://deno.land/x/std/http/server.ts";
const s = serve("0.0.0.0:8000");
async function main() {
for await (const { res } of s) {
res.respond({ body: new TextEncoder().encode("Hello World\n") });
}
}
main();