Skip to content

Simple web service using Go, Clean Arch, PostgreSQL, Redis

Notifications You must be signed in to change notification settings

wisnuuakbr/go-article-services

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Web Service

A simple web service Sagala using :

Requirements

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

Installation

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

Configuration

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

Run Application

$ go run .\cmd\main.go

Output

POST article:

Output Create Response

GET All Article:

Output GetAll Response

GET Article with filter

Output Search Response

About

Simple web service using Go, Clean Arch, PostgreSQL, Redis

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages