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.
- A running PostgreSQL server
https://deno.land/#installation
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