/zip-lookup

Lookup zipcode by country and code using http://www.zippopotam.us/ and present the resulting information.

Primary LanguageTypeScript

Overview

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

Usage

Both server and ui should be running at the same time

Run server:

  1. In zip-lookup-server directory, npm install and then execute npm run start
  2. Navigate to localhost:4000 to validate that the server is running and reachable

Run CRA:

  1. In zip-lookup-ui directory, npm install and then execute npm run start
  2. Navigate to localhost:3000
  3. 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)