This simple microservice responds with the Unix and UTC timestamp for any valid time (milliseconds or YYYY-MM-DD) sent to it.
I built this little website for freeCodeCamp’s first APIs and Microservices Projects.
This was my first time building a microservice and it was a good first step in learning how to correctly set up my project in a Node- and Express-based environment. I learned a lot working through this one, and no doubt, I’ll continue to learn a lot working through the subsequent APIs and Microservices Projects.
The brief for the Timestamp Microservice project was as follows:
{"unix": <date.getTime()>, "utc" : <date.toUTCString()> }
e.g. {"unix": 1479663089000 ,"utc": "Sun, 20 Nov 2016 17:31:29 GMT"}
{"error" : "Invalid Date" }
.