Aplikasi ini dibuat menggunakan bahasa pemrograman Golang dan database PostgreSQL
- Clone repository
- Copy file
.env.example
menjadi.env
- Sesuaikan konfigurasi database pada file
.env
- Jalankan perintah
go mod tidy
untuk mendownload library yang dibutuhkan - Docker
- masuk ke direktori aplikasi
- jangan lupa create network
docker network create tlab
(menyesuaikan nama network) - jalankan perintah
docker-compose build
- kemudian jalankan perintah
docker-compose up -d
- app diexpose ke port
:8080
- database diexpose ke port
:5432
- Manual
- masuk ke direktori aplikasi
- jalankan perintah
go run .
- Struktur database
- ERD
- Ingredient
- [GET]
/api/get_ingredients
- Get all - [POST]
/api/create_ingredient
- Create - [GET]
/api/get_ingredient/{id}
- Get by id - [PUT]
/api/update_ingredient/{id}
- Update - [DELETE]
/api/delete_ingredient/{id}
- Delete
- Category
- [GET]
/api/get_categories
- Get all - [POST]
/api/create_category
- Create - [GET]
/api/get_category/{id}
- Get by id - [PUT]
/api/update_category/{id}
- Update - [DELETE]
/api/delete_category/{id}
- Delete
- Resep
- [GET]
/api/get_recipes
- Get all - [POST]
/api/create_recipe
- Create - [GET]
/api/get_recipe/{id}
- Get by id - [PUT]
/api/update_recipe/{id}
- Update - [DELETE]
/api/delete_recipe/{id}
- Delete
- Resep Bahan
- [GET]
/api/get_ingredients
- Get all - [POST]
/api/create_ingredient
- Create - [GET]
/api/get_ingredient/{id}
- Get by id - [PUT]
/api/update_ingredient/{id}
- Update - [DELETE]
/api/delete_ingredient/{id}
- Delete
- [GET]
/api/filter_recipeingredient?recipe={id}&ingredient={id}
- Get filter
- run test
go test -v .
- Bahan
- Kategori
- Resep
- Resep Bahan