Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 858 Bytes

README.md

File metadata and controls

30 lines (23 loc) · 858 Bytes

deno-todo-backend

This is a simple example of a Deno + Oak API server implementation of the TODO Backend spec.

An accompanied blog post for this project can be found here.

Prerequisites

  • A running PostgreSQL server

Setup

Install Deno

https://deno.land/#installation

Run the Server

Run the src/server.ts script with environment variables and networking enabled:

deno run --allow-env --allow-net ./src/server.ts

If you need to run the server with non-default PostgreSQL parameters:

DB_HOST=localhost \
DB_PORT=5432 \
DB_USER=postgres \
DB_NAME=todo \
deno run --allow-env --allow-net ./src/server.ts

# inline:
DB_HOST=localhost DB_PORT=5432 DB_USER=postgres DB_NAME=todo deno run --allow-env --allow-net ./src/server.ts