Skip to content

Latest commit

 

History

History
76 lines (51 loc) · 1.88 KB

File metadata and controls

76 lines (51 loc) · 1.88 KB

API Project: freeCodeCamp Request Header Parser Build Status

This is my request header parser for freeCodeCamp's second API project. Demo is available on my site. You can also check out my other freeCodeCamp projects.

User Stories

It seems we're short on user stories, this is the only one this time:

  • I can get the IP address, preferred languages (from header Accept-Language) and system infos (from header User-Agent) for my device.

Example Usage

[project_url]/api/whoami

Example output:

{
  "ipaddress": "86.205.25.192",
  "language": "en-GB",
  "software": "Macintosh; Intel Mac OS X 10_13_6"
}

Tools Used

Install and Build

Clone this repo

git clone https://github.com/zsoltime/fcc-api-request-header.git
cd fcc-api-request-header

Install dependencies

npm install

Start dev server

It starts a dev server, monitor for changes and restarts on any change.

npm run dev

Start

It starts the node.js application.

npm start

Run tests

It runs tests using Jest and Supertest.

npm test