yunussandikci / go-pure-api

Golang REST API without any HTTP Framework ⭐️

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Golang Pure API

A Golang REST API project which doesn't use any http framework, router or mux that interacts with its own minimal in-memory database implementation and mongo database as a week-end experiment.
You can check details and test it from Swagger
Also you can access deployed API from here

GoDoc

Documentation

  1. Swagger documentation can be accessible from here.
  2. Go documentation can be accessible from here.

Development

  1. This project contains unit and integration tests which can be run with the following command.
go test ./... -run="^Test"
  1. Swagger documentation generated by using Swag. It can be re-generated after changes with the following command.
swag init --output ./app/docs
  1. This projects uses Mockery for mock generation. It can be re-generated when required with the following command.
mockery --case underscore --all --disable-version-string --output app/mocks

Running

You can easily run this application on your local with building a binary image and providing MONGO_URI environment variable while running this image. Also, you can use Dockerfile to build a docker image and run.

go build
export MONGO_URI=mongodb+srv://user:pass@host/database
./go-pure-api

About

Golang REST API without any HTTP Framework ⭐️

License:GNU General Public License v3.0


Languages

Language:Go 99.6%Language:Dockerfile 0.4%