Simple Blog System.
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.
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
go install github.com/swaggo/swag/cmd/swag@latest
make swagger-init
make help
➜ go mod download
➜ make tidy
➜ go run main.go
➜ go build
➜ make test
Access the application using the port 5007
.
Open url http://localhost:5007/swagger/index.html in browser.
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