Skip to content

tharitthaveekittikul/borrow-backend-mongoDB

Repository files navigation

borrow-project-backend

เหลือสร้าง schema และสร้าง api ของ

  • admin
  • type

pre requires

  • docker
  • docker compose
  • nodejs v.14+
  • make (optional)

... or you need to use your db server. you can config at .env then docker is optional.

exec to mongo cmd

docker exec -it borrow-backend-mongodb-database-1 bash
mongosh -u root -p example

start this project

# run db first
docker compose up -d
npx prisma db seed
npm run start

how to run db

  • start
make up # for linux
docker compose up -d # any
  • stop
make down # for linux
docker compose down # any

update schema

Could config schema at prisma/schema.prisma and run

npm run migrate

how to test api with postman

  • import borrow-project.postman_collection.json to postman
  • create env

image

  • select env

image

  • run it

image

About

using mongoDB + Prisma + express

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published