Skip to content

Code2gether June challenge: simple API + react website returns city upon user input with country & zip code

Notifications You must be signed in to change notification settings

reddtoric/CityFinder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CityFinder

Code2gether June challenge: simple API + react website returns city upon user input with country & zip code

Project deployed at https://app-test-one.azurewebsites.net/. (I use the same Azure web app project for other sandbox projects as well so City Finder may or may not be up.)

GIF of City Finder

Frameworks/Libraries/APIs used

Study Notes

Critiques

  • ✓ use Microsoft.Extensions.Configuration for API key instead of static class with constants
  • ✓ static HttpAccess class is anti pattern, use IHttpClientFactory in a scoped client
  • location = await UsaCityFinder.GetCity(location); is mutable. Immutable is preferred

Learning Journal

*I really should use TypeScript
*Although I could send queries to third party APIs straight from the frontend, I didn't because I want to practice creating APIs.

  • dotnet user-secrets to store development secrets such as keys
  • Use Microsoft.Extensions.DependencyInjection, ... .Configurations, and ... .Options to access development and production keys
  • Practice publishing on Azure
  • Set up CI/CD using GitHub action workflows to deploy to Azure App service
  • Configure Google Maps API access restrictions
  • Set up zipcodebase.com API key in the Azure app configuration

About

Code2gether June challenge: simple API + react website returns city upon user input with country & zip code

Resources

Stars

Watchers

Forks