Skip to content

Commit

Permalink
Add examples to website.
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Dec 19, 2018
1 parent 7a0d937 commit 528eb2a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
29 changes: 29 additions & 0 deletions website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,35 @@ <h1>Deno</h1>

<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:https://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>
Expand Down
6 changes: 6 additions & 0 deletions website/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ a {
color: #333;
}

pre {
background: #ddd;
padding: 15px;
word-wrap: normal
}

a:hover {
background: #aee;
}
Expand Down

0 comments on commit 528eb2a

Please sign in to comment.