This project provides a simple zip / postal code lookup tool. The tool accepts a country and postal / zip code and displays the city and state / province that the code refers to
- The server use NodeJS with Apollo Server (GraphQL), and uses https://www.zippopotam.us/ as a data source
- The UI use a Create React App with simple Material UI
Both server and ui should be running at the same time
- In zip-lookup-server directory,
npm install
and then executenpm run start
- Navigate to
localhost:4000
to validate that the server is running and reachable
- In zip-lookup-ui directory,
npm install
and then executenpm run start
- Navigate to localhost:3000
- Select a country and enter the postal / zip code
Note: This version does not have any validation in the postal / zip code input. Any string will be accepted
Example usage:
-
- Select "Canada"
- Enter the first 3 characters of a Canadian postal code (ex: L7C, M5E)
-
- Select "United States"
- Enter 5 digit zip code (ex: 90210, 04401)