blog-api

command module
v0.0.0-...-4a9023c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2022 License: MIT Imports: 7 Imported by: 0

README

Simple blog system

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL