WOW! That’s an awesome job! The CONFIG
is ready!
Now we’ll add a logger middleware to our express server to see which requests are coming in.
Install the npm module morgan
and use it according to the
instructions
Once you’re done, spin up the server, open your browser and verify 2 things:
- the response from
http://localhost:8080/config should have the same structure as
the original on on https://v2.coderslang.com/evil-empire-config - the requests to your server should appear in the terminal like this
GET /config 200 4451 - 2.061 ms
This task is part of the Full-Stack JavaScript Course.
If you have any issues with it, you can ask for community help below the post.
Feel free to help others if you’ve already solved the task.