- Download this folder somewhere in your system
- Open a terminal and change path to this folder
- Make sure node and npm is installed by checking version
node -v
andnpm --v
- Install packages with
npm install
- Run the backend server
node index.js
- Now you can make the api calls on the below written routes and the url
localhost:3000
using Postman or anything else
/book?name=somename&type=yoga
is a POST route for booking a slot in a class with a user name and a type of class , it takes two query parametersname
andtype
and returns an appropriate result/cancel?name=somename&type=yoga
is a POST route for cancelling a slot in a class with a user name and a type , it takes two query parametersname
andtype
and returns an appropriate result
- The classes and their respective timing have been intialized to some arbitrary values they can be changed and checked as needed