![Simple blog system](https://github.com/edlorenzo/blog-api/raw/4a9023c52aec/logo.png)
blog-api
Simple Blog System.
Quick start
Quick start you must install docker, docker-compose, Git and Fiber-Swagger.
Starts ready docker container
mkdir database && chmod o+w ./database && chmod o+w ./tests/postman
Builds and tests
git clone https://github.com/edlorenzo/blog-api.git
cd blog-api
chmod a+x start.sh
./start.sh
Press Ctrl + c
to stop application.
Getting started
Install Golang (go1.11+)
Please check the official golang installation guide before you start. Official Documentation
Also make sure you have installed go1.17+ version.
For more info and detailed instructions please check this guide: Setting GOPATH
Initialize Swagger Docs
go install github.com/swaggo/swag/cmd/swag@latest
make swagger-init
Working with makefile
make help
Install dependencies
➜ go mod download
➜ make tidy
Run
➜ go run main.go
Build
➜ go build
Tests
➜ make test
Swagger UI
Access the application using the port 5007
.
Open url http://localhost:5007/swagger/index.html in browser.
Authentication
Some API required to authenticate.
Once a user successfully logged in, simply copy the token id from the response to authorize, following this format.
Token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NDYwMzg1OTEsImlkIjoxfQ.P3XVfmA25WC9V6yvXpk5qoC-accIuHnIjKL_0rswVmg
![Simple blog system](https://github.com/edlorenzo/blog-api/raw/4a9023c52aec/token.png)