Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1002 Bytes

README.md

File metadata and controls

40 lines (27 loc) · 1002 Bytes

codetest

This project exists to serve as the server component of a code test. The project serves a HTTP json response from URL http://localhost:8080. The response will contain lotteries, game types and game offers.

The json document is in the /json directory of this project.

The project is written in golang. To build and run the example you will need to install docker.

Build

Before you run the container you need to build the source code for the conainer.

Container build

Creates a statically linked binary for linux because docker runs under linux.

 ./build.sh

Run

The program runs in docker and exposes the service on port :8080 on localhost.

 ./run.sh

To access http://localhost:8080

Development

Git

Add git hooks

ln -s `pwd`/hooks/pre-commit .git/hooks

Local build

go get -v ./... && go build -v