From 76577604974e146179611a0f9996f79ac86e6ed8 Mon Sep 17 00:00:00 2001 From: Alexandru Popescu Date: Tue, 28 Jan 2025 18:23:25 +0200 Subject: [PATCH] Update README.md --- README.md | 39 ++++++++++++++------------------------- 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index f62e8ec..5bf69f3 100644 --- a/README.md +++ b/README.md @@ -1,44 +1,33 @@ -# Backend Interview Starting Point - -This repo will serve as a starting point for your code challenge. Feel free to change anything in order to complete it: Change framework, other tests, new gems etc. - - ## Local setup 1. Install ruby: `$ rvm install 3.4.1` 2. `$ cd .` or `$ cd ` to auto-create the rvm gemset 3. Install bundler: `$ gem install bundler` 4. Install the dependencies with bundler: `$ bundle install` -## Run CLI command to start the server -`$ bin/start` - ## Run tests `$ bundle exec rspec` -## Tools - +## Run CLI command to start the server +`$ bin/start` ---- -## Use -# Start the server: `$ bin/start` -# Choose a provider to call the endpoind, I choose Thunder Client in VS Code. (Postman, Insomnia) +#### Choose a provider to call the endpoind, I choose [Thunder Client](https://www.thunderclient.com/) inside VS Code. (Postman, Insomnia) `http://localhost:9292/api/closest_shops?lat=47.6&lon=-122.4` -# Should see a reponse similar to: +#### Should see a reponse similar to: +![image](https://github.com/user-attachments/assets/7b3f7d83-4b94-4e7a-b2c0-ad2452a09f84) -# Also can test from terminal -'curl "http://localhost:9292/api/closest_shops?lat=47.6&lon=-122.4"' -'Coffee shops nearest (47.6, -122.4) by distance: +#### It can be also tested using the terminal +```curl "http://localhost:9292/api/closest_shops?lat=47.6&lon=-122.4"``` +``` +Coffee shops nearest (47.6, -122.4) by distance: 0.0645 <--> Starbucks Seattle2 0.0861 <--> Starbucks Seattle 10.0793 <--> Starbucks SF' +``` +### Disclaimers -## Disclaimer - -# Authentication is not taken into account -# I did not deploy it anywhere - -# I tought about setting up a DB, querying the endpoint to seed it and then seeding it periodically. -# But taking into the consideration the size of the csv file, the minimal number of requests I choose to prioritize always having the latest data and calling the endpoint through my CoffeeShopFinderServiceon each request +- Authentication is not taken into account +- I tought about setting up a DB, querying the endpoint to seed it and then seeding it periodically. +- But taking into consideration the size of the csv file and the minimal number of requests I choose to prioritize always having the latest data and calling the endpoint through my CoffeeShopFinderServiceon on each request