Skip to content

ryannatesmith/fetch-receipt-processor

Repository files navigation

Receipt API

Compiling The Code

Use the Makefile command make image to compile the code in a docker image.

Running The Program

Use the Makefile command make run to run the docker image build from make image. The server listens on port 8080, and the container port is published to the same host port (i.e. 8080).

Testing the API

You can test the API by sending commands to http://localhost:8080/<endpoint>. There are example commands in post.sh and get.sh to try out the API.

Code Structure

cmd

This is where the main method is defined, and where dependencies are generated. cmd/api/app sets up the dependency graph, validates that it is valid, and also contains some tests to verify the API works as expected, based on the samples given in the problem statement.

pkg

This is where the application business logic lives. The core directory contains code that sets up an API server, as well as a very rudimentary library for generating structured errors.

gen

This directory contains code generated from the open API spec. The code is committed to the repository to simplify build steps.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors