go-mux

command module
v0.0.0-...-d7a310c Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2020 License: MIT Imports: 9 Imported by: 0

README

Go REST API Test Example

This repo is the completed code of the tutorial Building and Testing a REST API in Go with Gorilla Mux and PostgreSQL

How to run

Install PostgreSQL with Docker
docker run -it -p 5432:5432 -d postgres
Add environment variables for PostgreSQL connection

Add following lines to ~/.bashrc

export APP_DB_USERNAME=postgres
export APP_DB_PASSWORD=
export APP_DB_NAME=postgres
Run the test
go test -v

or with the following command if you don't want to export the previous variables

APP_DB_USERNAME=postgres APP_DB_PASSWORD= APP_DB_NAME=postgres go test -v

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