Skip to content

This web API serve ride data efficiently by using pagination along with logging to trace back changes.

Notifications You must be signed in to change notification settings

ykgautam09/hm-backend-coding-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Travel Information System

This API provides travel information for various trips and provides means to save new ride informations.

Configuration

Server SETUP

  1. clone the repository
  2. configure node on version v10.24.1
  3. run command `npm start`
  • To test code coverage run command `npm run coverage`.
  • To apply git pre-push hook copy `src/git hook/pre-push` file to `.git/hooks` directory
  • Navigation

    • GET /health : responds `Healthy` when API up and running.

    • GET /rides : response with rides data (JSON)
      • Query parameter :
        1. page (Number) : default 1
        2. size (Number) : default 10

    • POST /rides : response with rides data
      • Data format :
        1. start_lat (Number) : Starting point of ride in latitude must be in range of [-90,90]
        2. start_long (Number) : Starting point of ride in latitude must be in range of [-180,180]
        3. end_lat (Number) : Ending point of ride in latitude must be in range of [-90,90]
        4. end_long (Number) : Ending point of ride in latitude must be in range of [-180,180]
        5. rider_name (String) : Name of the Rider should be a non empty string
        6. driver_name (String) : Name of the Driver should be a non empty string
        7. driver_vehicle (String) : Name of the Vehicle should be a non empty string

    • GET /rides/:id : responds with ride data (JSON) for the provided id (Number)

    About

    This web API serve ride data efficiently by using pagination along with logging to trace back changes.

    Topics

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published