Skip to content

synrgy-5-fsw-1-cihuy/challenge-6-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Challenge 6 Guide

This is a simple REST API with Repository Pattern.

Please read the CASE file to understand the problem.

Please read the GUIDE file to understand the solution.

Installation

git clone [email protected]:synrgy-5-fsw-1-cihuy/challenge-6-guide.git
cd challenge-6-guide
npm install

Usage

npm run dev

Database Migration

npx sequelize-cli db:migrate

Database Seed

npx sequelize-cli db:seed:all

Repository Pattern

Main Concept of Repository Pattern

Request -> Route -> Controller -> Service -> Repository -> Database -> Repository -> Service -> Controller -> Response

Controller

  • Handle request and response
  • Call service

Service

  • Handle business logic
  • Call repository

Repository

  • Handle database query

Releases

No releases published

Packages

No packages published