This projects implements a simple RESTful API that processes HTTP requests.
It makes use of Express.js, a minimal and flexible Node.js framework that includes a myriad of HTTP utility methods for quickly creating robust APIs. We also use the Body Parser package, which is Node.js middleware that allows us to process any POST requests we receive.
To test this project:
curl -H "Content-Type: application/json" -X POST -d '{"username":"test","data":"1234"}' http://rest-api.glitch.me/update
In a new tab, go to: https://rest-api.glitch.me/update?username=testUser&data=1234
Keep this project open and view 'Logs' to see the console output.
You can see other example projects on our Community Projects page. And if you get stuck, let us know on the forum and we can help you out.