This project i am to create a set of API endpoints defined in the API Endpoints Specification section and use database to store data.
Below are the Endpoints that have been created.
EndPoints | Functionality | HTTP Method |
---|---|---|
api/v1/devices | Add device | POST |
api/v1/devices | Fetch all devices | GET |
api/v1/devices/:id | Fetch one device | GET |
api/v1/devices/:id | Edit a device | PUT |
api/v1/devices/:id | Delete a device | DELETE |
TOOLS TO BE USED IN THE CHALLENGE
- Server-Side Framework:Node Javascript Framework
Requirements
npm install node
npm install express
npm install nodemon
npm install babel
How to run the application
- Make a new directory on your computer
git clone
thisrepo
- Create virtual environment by typing this in the terminal - virtualenv -p python3 venv
- run
cat requirements.txt | xargs npm install -g
on the terminal to install the dependencies - Then type on the terminal
npm run start-watch
to start and run the server
Author
Harun Gachanja Gitundu