Tuas W06
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user