1.2 KiB
1.2 KiB
Assignment 4:
Name: Yovan Budianto Tanujaya
NRP: 5803025020
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]:
CREATE DATABASE w04_5803025020;