Skip to content

Latest commit

 

History

History
55 lines (35 loc) · 1.08 KB

README.md

File metadata and controls

55 lines (35 loc) · 1.08 KB

Teck Stack

  • Deno
  • MySQL

Prerequisite

  • Install docker latest version (>= 24)

Getting Started

  1. Start the database and app. The db container will create table automatically according to here.
docker compose up -d
  1. Enter the app container
docker compose exec app bash
  1. Run the migration for seed data
deno task db:migration
  1. test the API using endpoint http://localhost:8080/health

Testing

  1. Enter app container as above
  2. Run deno task test

Warning

Run test will TRUNCATE all the tables, make sure to use dev database.

Remark

  • if deno is installed with a existing database instead of using docker, the project can start with deno task dev after database setup.

API Structure

Production consideration

  • use scripts/gen_jwt_secret.tsto generate key for production
  • Env should be stored securely (not .env file) and inject on deployment