This is a small demo on building a small web utility with Deno.
- Ky - A small HTTP client for Deno
- Oak - A small middleware library for Deno HTTP server
- Deno Driver - Postgres - A postgres driver for Deno
There are two components to this demo:
- Postgres database instance
- Deno web server
To start both in local Docker, from the project root directory, run
docker compose up -d
# Server should run at port 8000
Take a look at test.http for examples.
- Load API
POST /load
Content-type: application/json
{
"from": "2022-01-01",
"to": "2022-05-31",
"tags": ["deno", "node"]
}
- Statistics API
GET /stats/:k