Building simple blog app with go, gin, gorm, and postgresql
NB: This project currently still on progress
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 |
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/blog-rest-go
$ cd blog-rest-go
$ go mod tidy
Copy the .env.example file and rename it to .env
Change the config for your local server
DB_HOST = localhost
DB_PORT = 5433
DB_USER = postgres
DB_PASSWORD =
DB_NAME = blog_rest_go
PORT = 3000
$ go run db\migration\migration.go
$ go run main.go