hng_boilerplate_golang_web

command module
v0.0.0-...-026aa9f Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

README

hng_boilerplace_golang_web

Prerequisites

  1. Go 1.17 or lastest version already installed on your local machine.
  2. 2 Postgresql servers (one serves as normal database server, and another for running tests). You can use a disposable docker instance for tests

Run Project from Root

  1. Ensure your postgres instances are running
  2. Create and populate a app.env file on the project root with its keys and corresponding values as listed in app-sample.env
  3. Run from project root directory
$ go run main.go

Testing

  1. Automated unit and integration tests done with golang's builtin testing package.

To run one test file:

$ go test -v  ./tests/<file name> -timeout 99999s

To run all tests:

$ go test -v  ./tests/<folder name>/<file name> -timeout 99999s
$ go test -v  ./tests/... -timeout 99999s

NB: Always add timeout tag to prevent early timeout

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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