diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-12-18 18:13:01 -0500 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-12-18 19:05:48 -0500 |
commit | 528eb2adb38b44def28aeab006cd0ba1e2654239 (patch) | |
tree | 1862d1fd0b162f59494ab6f23a7202c3c4a86055 | |
parent | 7a0d9370e86e739461a628c822d7992ea450294f (diff) |
Add examples to website.
-rw-r--r-- | website/index.html | 29 | ||||
-rw-r--r-- | website/style.css | 6 |
2 files changed, 35 insertions, 0 deletions
diff --git a/website/index.html b/website/index.html index f5580d314..7cb2480dc 100644 --- a/website/index.html +++ b/website/index.html @@ -20,6 +20,35 @@ <p> <a href="typedoc/index.html">API Reference</a> + <p>Install Deno into ~/.deno/bin +<pre> +curl -L https://deno.land/x/install/install.py | python +export PATH=$HOME/.deno/bin:$PATH +</pre> + +Try a Deno program. Install by bash alias. +This one serves a local directory in HTTP. +<pre> +alias file_server="deno \ + https://deno.land/x/net/file_server.ts --allow-net" +</pre> + +Run it: +<pre> +% file_server . +Downloading https://deno.land/x/net/file_server.ts... +[...] +HTTP server listening on http://0.0.0.0:4500/ +</pre> + +And if you ever want to upgrade to the latest published version: +<pre> +file_server --reload +</pre> + +<a href="https://deno.land/x/">Other Deno modules are served here.</a> + + <h2>Execution time</h2> This shows how much time total it takes to run a few simple deno programs: <a href="https://github.com/denoland/deno/blob/master/tests/002_hello.ts">tests/002_hello.ts</a> diff --git a/website/style.css b/website/style.css index c84f0bbf6..1e604d0e8 100644 --- a/website/style.css +++ b/website/style.css @@ -19,6 +19,12 @@ a { color: #333; } +pre { + background: #ddd; + padding: 15px; + word-wrap: normal +} + a:hover { background: #aee; } |