Book lending API is developed with node.js version 8. It uses async and await to provide synchronity to the tasks.
Following are the project dependencies:
- Hapi
- Joi
- Monk
- dotenv
- Install node and all the dependencies.
- Create an .env file inside the main project directory if not present already.
DB_URL='<enter value here>'
PORT= 3000
- Run command, once you are inside the project directory.
node index.js
- You can check the project on the localhost:3000/
- Now you can run the post commands by using httpie, curl or postman - sample commands are provided in sample.json
NOTE- Sample.json include the example commands to execute the tasks in the api.