golang-hex

module
v0.0.0-...-bb5f922 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: MIT

README

golang-hex

A brief example of a golang project using a hexagonal architecture design.

Installation

You can run the app using normal go run command or go build. It uses 2 environment variables but both have a default

  • MONGURI: mongodb://mongo:27017
  • PORT: 5000

For the above to work you will need a mongdb instance running on the shown port.

Run

I've took the liberty of creating a docker-compose file that builds the app into a binary and runs a mongo instance that it has access to.

To start the server just run docker-compose up --build

The API will be available on http://localhost:5000/user

Available endpoints

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

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