GET & POST APIs using Node.js with simple javascript database file
Steps to follow -
- Take a clone using the following command in your terminal - git clone https://github.com/kuhuk/nodejs-get-post-api.git
- Open the project in your IDE (VSCode - recommended)
- Run the command - npm run start. This will make your localhost server up and running.
- Now you can access both of the APIs - GET & POST.
- To checkout GET API - Open internet browser on your local machine and in a new tab copy paste the following link - http://localhost:5000/api/todos
- To checkout POST API - Use Postman and send data in JSON format (recommended) and hit the API.
PS - You can use Postman for both of the APIs.
And, you are done! :)