Deno is a runtime for JavaScript and TypeScript that is based on the V8 JavaScript engine and the Rust programming language. It was created by Ryan Dahl, the original creator of Node.js, and is focused on security and productivity. It was announced by Dahl in 2018 during his talk "10 Things I Regret About Node.js
Deno is a program for running JavaScript and TypeScript code outside of a browser.
Getting started with Deno
Install Deno
Using Shell:
curl -fsSL https://deno.land/x/install/install.sh | shOr using PowerShell:
iwr https://deno.land/x/install/install.ps1 -useb | iexUsing Homebrew (macOS or Linux):
brew install denoUsing Chocolatey (Windows):
choco install denoSee deno_install for more installation options.
Example
Try running a simple program:
deno run https://deno.land/std/examples/welcome.tsOr a more complex one:
import { serve } from "https://deno.land/std@0.50.0/http/server.ts";
const s = serve({ port: 8000 });
console.log("http://localhost:8000/");
for await (const req of s) {
req.respond({ body: "Hello World\n" });
}Home: https://deno.land/
Github: https://github.com/ry/deno
Comments
Post a Comment