Hosted at: www.fastjobsapi.herokuapp.com
- npm
- Node JS
- Nodemon
- Express
- MongoDB Atlas
- Mongoose
- PostMan
- convert-excel-to-json library
- Clone this repository:
git clone https://github.com/aditirao7/excelapi.git
- Install Node JS and npm.
- Navigate to the git directory and run
npm install
- Then run
npm run start
- The app will now be up and running on localhost:8080.
- The excel file can be uploaded either directly through PostMan or through the form on the homepage:
-
The sample excel file here had 3 data records.
-
POST route “/api/pet” can be used to upload in PostMan:
- GET route “/api/pet” to get all the pets in the database:
- GET route “/api/pet/:petId” to get a specific pet:
- PATCH route “/api/pet/:petId” to update the details of a specific pet: (make sure the type of the raw data sent is selected as JSON)
- DELETE route “/api/pet/:petId” to delete a specific pet:
- Similarly API can be interacted with on the herokuapp through PostMan as well, initial URL changes from localhost:8080 to https://fastjobsapi.herokuapp.com and the routes remain the same. (If it is not a POST or PATCH request make sure to select none in request body in PostMan otherwise it tends to give a 503 status error)