Cool, so logger
returns a middleware function, but it doesn’t do much yet.
Let’s improve its behavior:
- log current date, request method and url for each incoming request using
console.log
- this data should be printed as a single line where each piece of information is split by a single space (' ‘)
- Date should be printed out as a result of the function
getFormattedDate
method
andurl
should be picked from the function objectreq
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.