An open API service indexing awesome lists of open source software.

https://github.com/mikekasprzak/sample-deno-app

A reference web application written to teach Deno
https://github.com/mikekasprzak/sample-deno-app

deno denoland eta oak typescript

Last synced: 3 months ago
JSON representation

A reference web application written to teach Deno

Awesome Lists containing this project

README

          

![](/docs/screenshot1.png)

A reference web application written to teach [Deno](https://deno.land).

The purpose was to showcase what an HTML web server application *SHOULD* look like without much fat.

It uses:

* Oak - For routing HTTP requests.
* Eta - For rendering HTML templates.

## Where do I start?
While this isn't being written or maintained as a tutorial, you may find these files helpful.

* [main.ts](/main.ts) - The source code... yes, that's essentially it (though some snippets can be found in the templates).
* [template/patient.eta](/template/patient.eta) - The most-complete page template. Written to be easy to read and follow, though it does include a examples of how you might align things or make them optional.
* [static/style.css](/static/style.css) - CSS styles, paired with the templates. Includes a brief CSS crash-course at the top.
* [deno.json](/deno.json) - The Deno configuration file. I wanted to show how little you actually need, so this file is bare.

## How do I run this?
Install deno, checkout the code, open a terminal and browse to the directory, and run the following:

```bash
deno task run
```

The first time Deno should download a few packages, then start the server. Open in your web browser to view the application. Push `CTRL+C` in the terminal to stop the server.