This commit is contained in:
Yovan
2026-10-03 20:28:25 +07:00
parent 14283c2b61
commit 650b24619f
23 changed files with 2373 additions and 30 deletions
+42
View File
@@ -0,0 +1,42 @@
# Assignment 4:
**Name:** Yovan Budianto Tanujaya<br>
**NRP:** 5803025020<br>
---
## Overview
Proyek ini adalah **RESTful Web API** yang dibuat menggunakan **Go** dengan **PostgreSQL** sebagai penyimpanan database utama. Proyek ini mencakup **manajemen autentikasi, operasi pada store layer, serta pengujian otomatis** yang meliputi **unit test, integration test, dan E2E test**.
---
## Prerequisites
* **Go:** Version 1.22 higher
* **PostgreSQL:** Local
* **OS:** Windows / Linux / macOS
---
## Environment Variables
The application relies on the following environment variables for database configuration and testing:
| Variable | Description | Default / Example |
| :--- | :--- | :--- |
| `DB_HOST` | Database host address | `localhost` |
| `DB_PORT` | Database port | `5432` |
| `DB_USER` | Database username | `postgres` |
| `DB_PASSWORD` | Database password | *Your local database password from postgresql* |
| `DB_NAME` | Database name (**must end with `_test`** during testing) | `w04_5803025020` |
---
## Database Setup
Before running integration tests, create a PostgreSQL test database with a name ending in `_test` as a safety guard[cite: 3, 4]:
```sql
CREATE DATABASE w04_5803025020;