# Packages
No description provided by the author
# README
Receipt Processor
A mock webservice written in Golang that reads a receipt and calculates reward points.
Instructions to run application locally
Running Locally without Taskfile
- Run docker unit tests
docker run -p 8080:8080 receipt-processor-build go test ./...
- Build docker image
docker build -t receipt-processor-build .
- Run docker container
docker run -p 8080:8080 receipt-processor-build
Running Locally using Taskfile
This services uses Taskfile for ease in running various commands.
- To install for Mac users, Install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Then install task using brew:
brew install go-task/tap/go-task
-
For other OS/ package managers, follow steps for your package manager provided here: https://taskfile.dev/installation/
-
Run Docker unit tests
- All packages
task docker-test
- A single package
task docker-test PKG=[path to package]
- All packages
-
Build Docker image
task docker-build
-
Run Docker container
task docker-run
-
Postman (optional. Would need to create postman account)
- Click on the button below and click on
View collection
to run in web browser. You can alsoimport a copy
orFork Collection
. - Set the "receipt-processor_url" to the local url of host. Example: localhost:8080
- Click on the button below and click on