Skip to content

amaziahub/node-rest-skeleton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

  • node v22.2.0

Installation

  • clone project (git clone cmd)
  • run npm install to install dependencies
  • run npm run build to build the dist files
  • run npm run start and open your browser to http://localhost:3000 in order to interact with the server

API's

  • GET /api/rooms - should return all rooms in the system
  • GET /api/bookings/available - should return all rooms that are available for booking for specific date
  • POST /api/bookings/book - should enable to book a room given the request is valid
  • GET /api/bookings/reset - reset bookings

Examples

Testing the app

  • Via rest API - pls use call the relevant apis pointed above
  • Via test suites - run npm run test in order to test the api specs