How to set up a simple api:
- Download and install nodejs
- npm init -y & npm install express in terminal
- Create index.js file
- Copy contents from index.js on github
- node . to start api
Test with:
curl -X GET localhost:8080/bible/
curl -X POST -H "Content-Type: application/json" -d "{\"msg\": \"hello world\"}" localhost:8080/echo/1337/
Based on https://www.youtube.com/watch?v=-MTSQjw5DrM&ab_channel=Fireship
Just creating a basic tutorial because I always forget.