A simple web service Sagala using :
Sagala is currently extended with the following requirements.
Instructions on how to use them in your own application are linked below.
Requirement | Version |
---|---|
Go | 1.21.5 |
Postgres | 14.10.^ |
Redis | 8.11.5 |
Make sure the requirements above already install on your system.
Clone the project to your directory and install the dependencies.
$ git clone https://github.com/wisnuuakbr/sagala
$ cd sagala
$ go mod tidy
Copy the .env.example file and rename it to .env
$ cp .env.example .env
Change the config for your local server
APP_NAME = "sagala"
APP_ENV = "development"
APP_PORT = 3000
POSTGRES_HOST_MASTER = "localhost"
POSTGRES_PORT_MASTER = 5432
POSTGRES_USER_MASTER = "postgres"
POSTGRES_PASSWORD_MASTER = "postgres"
POSTGRES_DB_MASTER = "sagala_v1_db"
REDIS_HOST = "localhost"
REDIS_PORT = 6379
REDIS_PASSWORD = ""
REDIS_DB = 0
$ go run .\cmd\main.go