https://github.com/wisnuuakbr/go-article-services
Simple web service using Go, Clean Arch, PostgreSQL, Redis
https://github.com/wisnuuakbr/go-article-services
cleanarch golang postgresql redis
Last synced: 2 months ago
JSON representation
Simple web service using Go, Clean Arch, PostgreSQL, Redis
- Host: GitHub
- URL: https://github.com/wisnuuakbr/go-article-services
- Owner: wisnuuakbr
- Created: 2024-07-29T09:15:13.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-07T14:04:32.000Z (almost 2 years ago)
- Last Synced: 2025-01-09T03:41:46.844Z (over 1 year ago)
- Topics: cleanarch, golang, postgresql, redis
- Language: Go
- Homepage:
- Size: 154 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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.
```bash
$ git clone https://github.com/wisnuuakbr/sagala
```
```bash
$ cd sagala
```
```bash
$ go mod tidy
```
## Configuration
Copy the .env.example file and rename it to .env
```bash
$ cp .env.example .env
```
Change the config for your local server
```bash
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
```bash
$ go run .\cmd\main.go
```
## Output
### POST article:

### GET All Article:

### GET Article with filter
