From a4dec944bc821d114bfd82debb72d60bd04f836d Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 11 Feb 2019 17:41:13 -0500 Subject: web design (#1728) --- website/index.html | 220 +++++++++++++++-------------------------------------- 1 file changed, 63 insertions(+), 157 deletions(-) (limited to 'website/index.html') diff --git a/website/index.html b/website/index.html index 86463e5d8..ffd83a253 100644 --- a/website/index.html +++ b/website/index.html @@ -3,26 +3,21 @@ Deno - - - +
- - - -

Deno

- -

- A new way to JavaScript - - -

+
+ + +
+

Deno

+ A new way to JavaScript +
+
@@ -31,30 +26,32 @@ - + - + @@ -64,7 +61,9 @@ - +
Windows
- deno - deno - + - +
- deno_std - deno_std - +
- + @@ -72,166 +71,73 @@ class="badge" href="https://ci.appveyor.com/project/deno/deno-install" > - +
- registry - registry
-

#Install

+

Install #

-

With Shell

-
curl -fL https://deno.land/x/install/install.sh | sh
-

With PowerShell

-
iex (iwr https://deno.land/x/install/install.ps1)
+

Mac or Linux

+
curl -fL https://deno.land/x/install/install.sh | sh
+

Windows (PowerShell)

+
iex (iwr https://deno.land/x/install/install.ps1)
-

#Mini-tutorial

+

Example #

-

Try a Deno program. This one serves a local directory in HTTP.

-
-alias file_server="deno \
-  https://deno.land/x/http/file_server.ts --allow-net"
-      
+

Try running a simple program:

+
deno https://deno.land/welcome.js
+ +

Or a more complex one:

-

Run it:

-% file_server .
-Downloading https://deno.land/x/http/file_server.ts...
-[...]
-HTTP server listening on http://0.0.0.0:4500/
-      
-

And if you ever want to upgrade to the latest published version:

-
file_server --reload
+import { serve } from "https://deno.land/x/http/server.ts"; +const s = serve("0.0.0.0:8000"); -

#Dig in...

+async function main() { + for await (const req of s) { + req.respond({ body: new TextEncoder().encode("Hello World\n") }); + } +} - - Documentation - +main(); -

- API Reference -

+

Dig in... #

- - Links to other Deno resources. - + Manual

-

#Continuous Benchmarks

+

API Reference

-

These plots are updated on every commit to

-

- master branch -

+

Style Guide

+ +

Module repository

-

#Execution time

-

This shows how much time total it takes to run a few simple deno programs:

- - tests/002_hello.ts - -

and

- Release notes - tests/003_relative_import.ts - -

-

- For deno to execute typescript, it must first compile it to JS. A warm - startup is when deno has a cached JS output already, so it should be fast - because it bypasses the TS compiler. A cold startup is when deno must - compile from scratch.

-
-

#Throughput

+

Community chat room

-

Time it takes to pipe a certain amount of data through Deno.

- - - echo_server.ts - -

and

- - cat.ts - -

Smaller is better.

- -
- -

#Req/Sec

+

Benchmarks

- Tests HTTP server performance. 10 keep-alive connections do as many - hello-world requests as possible. Bigger is better. -

- - - -
- -

#Executable size

-

deno ships only a single binary. We track its size here.

-
- -

#Thread count

-

How many threads various programs use.

-
- -

#Syscall count

-

How many total syscalls are performed when executing a given script.

-
- -

- Historical benchmark data + A curated list of awesome Deno things

- - - - - -- cgit v1.2.3