Tuesday, December 13, 2022

51/365: API With Express

 Today I used Express JS to make a simple API. First I initialized a repository with Node Pacakge Maanger and installed Express. From there, I wrote a little Javascript file that created the API and instructed it to listen on port 8080. From there I could define a GET method on the URI "coder" which returned a JSON object. From there, I downloaded a tool called Insomnia to help me query the API in a nice developer environment. Within Insomnia I sent my GET request, and got my JSON object as a response with a nice 200 OK code! 

No comments:

Post a Comment

190: Sablier

 The CodeHawks platform has an upcoming audit on the Sablier protocol, so I decided to read through the docs and familiarize myself with the...