Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Zip code API built with Express.js

NotificationsYou must be signed in to change notification settings

alvarezpj/zip-code-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository is the solution to theCUNY Tech Prep week 4 in-class project. The code contained here is meant to implement a zip code API usingExpress.js. The API has two main endpoints:

  1. localhost:8000/zip/:zipcode
  2. localhost:8000/city/:cityname

The first endpoint is used to request information based on zip code number, and the second for retrieving all the zip codes associated with a given city name.

To start the API locally, change directories intozip-code-api and runnode app.js. Then, in a browser window, enter any of the two endpoints above. The API will respond appropriately if the zip code or city name is valid, otherwise a 404 code is returned in the response. For example:

  • localhost:8000/zip/11377
  • localhost:8000/city/WOODSIDE

note: for the city endpoint, the name of cities must be provided in all caps.

About

Zip code API built with Express.js

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp