go-rest-api-template

module
v0.0.0-...-3719db4 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: MIT

README

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

Directories

Path Synopsis
cmd
api
lib
api

Jump to

Keyboard shortcuts

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