Skip to content

Go rest api template built with go-chi and upperdb

License

Notifications You must be signed in to change notification settings

jesseokeya/go-rest-api-template

Repository files navigation

Go Template

Go-chi, UpperDB Rest Api Template

Pre Requisites

Make sure you have golang installed on your system. Golang Instalation instruction

Installing Dependencies

To run this project you will need to install the third party dependencies.

Install golang version 1.19 which this template supports. You can also use go version manager (gvm) to manage various go versions

# Install gvm
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)

# Downlaod go version 1.19
gvm install go1.19

# Set golang version for project
gvm use go1.19

Lists dependencies

go list -m all

Install dependencies with

make tools

Runing Application Locally

To run this application use the command below

make run

Or

go run cmd/api/*.go 

Runing In Docker

To run this application using docker use the following command(s) below

docker-compose up -d 

Running Binary File

To run this application use the command below

sudo make build

And

./bin/api

Running the tests

To run the automated tests for this system

go test ./...

Built With

  • Chi - The web framework used
  • Upper DB - Data access layer for Go
  • Air - Live reload for Go apps
  • Goose - Database migrations

Authors

  • Jesse Okeya

About

Go rest api template built with go-chi and upperdb

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published