Skip to content
e-goatPublic

About

E-commerce API service based on Deno and Oak

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

56 Commits

Folders and files

Repository files navigation

REST API with Deno, Oak, Prisma

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.


START API SERVER

To get the api running first you need to install Deno runtime on your machine Deno

  1. After installation finish run: deno install
  2. Then fire the API server: deno run start
    • (The application should be running on port 8080)

SETUP DATABASE

Running local database happens via Docker, to bootstrap your db first you need to install Docker and then:

  1. Start your postgres container: docker compose up -d
  2. (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
  3. Copy .env.dev to .env and add your database credentials (for reference see ./docker/compose.yml)
  4. Apply migrations:
    • To generate your database representation use:
    deno run db-generate
    • And now apply the migrations
    deno run db-migrate
  5. Seed your database
    deno run seed

About

E-commerce API service based on Deno and Oak

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages