Hi everybody, i’m facing this challenge, i’ve copied your repository from github to start the project, and after in server.js, after the code that was just present, i add this code:
with the first two api request there aren’t problem, but i need some hints on the last api request, for sure i’m wrong in something, i hope you can lead me to the solving. Thanks
That’s not a valid json response. And you should see it somewhere in the console that Express is not happy with the response.
As a personal note.
There is this principle when writing software called DRY (don’t repeat yourself).
You can see that all 3 endpoint so far take the same params, a :date and return the exact JSON response: {unix, utc}.
So everything could be, and should be, unified in a single handler.