Route.get() requires callback functions but got a “object Undefined”
In the tutorial the todo.all returns a callback object. This is required for the router.get syntax. From the documentation: router.METHOD(path, [callback, …] callback) The router.METHOD() methods provide the routing functionality in Express, where METHOD is one of the HTTP methods, such as GET, PUT, POST, and so on, in lowercase. Thus, the actual methods are router.get(), router.post(), router.put(), and so on. … Read more