A reference web application written to teach Deno.
The purpose was to showcase what an HTML web server application SHOULD look like without much fat.
It uses:
- Oak https://oakserver.org - For routing HTTP requests.
- Eta https://eta.js.org - For rendering HTML templates.
While this isn't being written or maintained as a tutorial, you may find these files helpful.
- main.ts - The source code... yes, that's essentially it (though some snippets can be found in the templates).
- 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 - CSS styles, paired with the templates. Includes a brief CSS crash-course at the top.
- deno.json - The Deno configuration file. I wanted to show how little you actually need, so this file is bare.
Install deno, checkout the code, open a terminal and browse to the directory, and run the following:
deno task run
The first time Deno should download a few packages, then start the server. Open http://localhost:8080 in your web browser to view the application. Push CTRL+C
in the terminal to stop the server.