This is my solution for the Fetch-Rewards take home assessment, which is the Receipt Processor Challenge.
The required web server has been implemented in Go. I have chosen not to Dockerize it as the assessment details mentioned that the evaluator will have Go installed on their system.
I have installed four external packages to help implement this:
- chi - to set up routes
- render - to manage HTTP requests and responses
- validator - for validation of the
ItemandReceiptstructs - uuid - to generate UUIDs for the receipts
- Clone the repo
git clone https://github.com/akhilnalamala/receipt-processor.git
- Navigate to directory
cd receipt-processor
- Install dependencies
go mod tidy
- Run the server
go run main.go
- This runs and serves the app on localhost:8080, meaning the 2 endpoints are available at
http://localhost:8080/receipts/process - POST
http://localhost:8080/receipts/{id}/points - GET