Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wisnuuakbr/blog-rest-go
Building simple blog app with Go, Gin, Gorm, and PostgreSQL
https://github.com/wisnuuakbr/blog-rest-go
blog gin golang gorm restapi
Last synced: 20 days ago
JSON representation
Building simple blog app with Go, Gin, Gorm, and PostgreSQL
- Host: GitHub
- URL: https://github.com/wisnuuakbr/blog-rest-go
- Owner: wisnuuakbr
- Created: 2024-01-16T04:18:26.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-07-05T15:56:39.000Z (6 months ago)
- Last Synced: 2024-11-15T22:22:46.596Z (about 1 month ago)
- Topics: blog, gin, golang, gorm, restapi
- Language: Go
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple Blog RestAPI using Golang
Building simple blog app with go, gin, gorm, and postgresql
NB: This project currently still on progress
## Requirements
Simple RestAPI 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.0 |## 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/blog-rest-go
$ cd blog-rest-go
$ go mod tidy
```## Configuration
Copy the .env.example file and rename it to .env
Change the config for your local server```bash
DB_HOST = localhost
DB_PORT = 5433
DB_USER = postgres
DB_PASSWORD =
DB_NAME = blog_rest_go
PORT = 3000
```## Running Migration
```bash
$ go run db\migration\migration.go
```## Running Server
```bash
$ go run main.go
```