-
inisialisasi project
go mod init api-shiners
-
install dependencies
go get github.com/gofiber/fiber/v2 go get -u gorm.io/gorm go get gorm.io/driver/postgres go get github.com/joho/godotenv go get github.com/golang-jwt/jwt/v5 go get -u github.com/swaggo/swag/cmd/swag go get -u github.com/gofiber/swagger go get -u github.com/swaggo/files go get github.com/gofiber/fiber/v2/middleware/cors go get github.com/redis/go-redis/v9 go get github.com/stretchr/testify go get gopkg.in/yaml.v3@latest go mod tidy
-
Copy file .env.example menjadi .env
cp .env.example .env
-
Sesuaikan konfigurasi di .env:
DB_HOST=localhost DB_USER=postgres DB_PASSWORD=your_password DB_NAME=db_shiners DB_PORT=5432
REDIS_HOST=localhost:6379 REDIS_PASSWORD= REDIS_DB=0
-
Pastikan PostgreSQL sudah terinstal. Jika belum, unduh dari https://www.postgresql.org/download/
-
Buat database baru:
CREATE DATABASE db_shiners;
-
Menjalankan Aplikasi
Pastikan berada di root project, lalu jalankan: go run main.go
-
Notifications
You must be signed in to change notification settings - Fork 1
HSI-Boarding-School/lms-api
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
HSI Boarding School Internal LMS API
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published