Golang Documentation : https://go.dev/doc/
Golang Instalation : https://go.dev/doc/install
Redis Instalation : https://redis.io/download
- Adjust the .env File According to Your Need
- Make MySQL Database According to .env File
- Type go run main.go In Your Terminal
- standart response
- pagination response:
Example to Add in Params:
key: page, value: 1
key: per_page , value:3
key: paginate , value:1 (true or false for using pagination response)
- sort by {collumn} (default sort by last created_at )
Example to Add in Params:
key: sort , value author|asc -> for asc
key: sort , value author|desc -> for desc
- search any word in title or body
Example to Add in Params:
key: search , value:GolangCoding
- filter by {column} (can add more than 1 filter)
Example to Add in Params:
key:filter[] , value:{"option":"author","operator":"=","value":"jasper"}
key:filter[] , value:{"option":"title","operator":"=","value":"GolangCoding"}
- Run redis server first
redis-server
- Check redis server
redis-cli ping
- Endpoint Get Single Article
body: { "author": "Jasper", "title": "Golang Code", "body": "This is a Body of Golang Code Article" }