This project is a lightweight REST API built with the Deno runtime and the Oak middleware framework. It uses Prisma ORM for type‑safe database access and a Postgres database running in Docker. The goal is a clean, modern stack that’s easy to run locally and extend.
To get the api running first you need to install Deno runtime on your machine Deno
- After installation finish run:
deno install - Then fire the API server:
deno run start- (The application should be running on port
8080)
- (The application should be running on port
Running local database happens via Docker, to bootstrap your db first you need to install Docker and then:
- Start your postgres container:
docker compose up -d - (Optional) To make sure your db is responding run:
- Presumably the username is 'admin':
docker exec -it <postgres-container-name> pg_isready -U admin -d pgdb
- To check your container name see column 'name' from output:
docker container list
- If all good, you should see something like this:
/var/run/postgresql:5432 - accepting connections
- Copy
.env.devto.envand add your database credentials (for reference see ./docker/compose.yml) - Apply migrations:
- To generate your database representation use:
deno run db-generate
- And now apply the migrations
deno run db-migrate
- Seed your database
deno run seed