Aldair47x / Beon-NODEJS-TEST

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

♛ Beon tech test ♛

Problem Statement

This project is a hackerrank challenge to test the knowledge of nodejs in handle HTTP servers creation.


Mandatory Features

  • The web server should be created using only native HTTP module. ✓
  • Accept requests for the GET /projects/:id endpoint, where id is the value passed in the url. If the id value is not set or is empty in the url, the server responds back with the status code 400 and the JSON message {"message": "BAD REQUEST"}. ✓
  • If the ID is valid, filter the projects list based on the ID passed as input to the endpoint such that project id matched the input passed. The server sends a JSON response back with the filtered project data, along with the status code 200. ✓
  • If the ID is valid but no matching projects are found for the ID, the server responds with the status code 404. ✓
  • If the request to the web server contains a route other than /projects, the server responds back with the status code 404. ✓
  • Make sure that the server is listening for requests on port 8000. External tools will not be able to be connected to any port other than 8000. ✓

Screenshot-21.png

Installing and Running

  1. Make sure that you have node and npm installed on your computer.
  2. Fork and clone this repo on your computer.
  3. cd into the root directory and run npm install.
  4. Run npm start and point your browser to localhost:8000.

Authors

Follow me! – aldair47x@Twitteraldair47x@gmail.com

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

About

License:MIT License


Languages

Language:JavaScript 100.0%