A repo containing the FetchRewards takehome work.
- You're running a *nix based system
- You have nvm installed. If not click me!
-
- This should also install
npmby default (it did for me)
- This should also install
Please run the setup script to get everything situated
./setup.shPlease create and place a .env file in the root directory and format it like so:
API_KEY=<Your Key Here>(this is my preferred way to run it)
node dist/src/GeoToLatLong.js "Sacramento, California" "80026" "Boulder, Colorado"Simply run:
npm run geotolatlong -- "Boulder, Colorado" "80026"Simply run:
npm run test- I realize there are some glaring issues with code-quality and code-duplication. Given the nature of these endpoints being separate, and having different response bodies, I was inclined to separate them, as the logic to combine it might have been just as messy.
- The API treats 2 digit state codes as if they weren't entered, this required a LUT of sorts to address and replace with full state-names. This took up more time than I'd like to admit.
- There are some lingering issues around these state codes and their interactions with cities that contain spaces. This could be remedied with more time by encoding spaces for city names as + but this is another improvement that I don't have time for.
- There are numerous edge-cases around the API and expected results from bad ZIP codes, military ZIP codes, cities that don't exist, etc. that I didn't have the time to figure out how to mock and write those scenarios in Jest.
- This repo is very approachable and the setup script should let you hit the ground running.
- For my first time using Jest I'm happy with my work.
- Having linting and prettier also setup to ensure consistent code-quality throughout the repo.