Error: .post() requires callback functions but got a [object Undefined] not working
Instead of this:
app.post('/user/all',Controller.Create);
You try for:
app.post('/user/all', function(req, res){
Controller.Create
});
In my case it was because I had a misspelling between the router and controller file. Check both so that they match, the error .POST() requires callback functions but got a [object Undefined]
has nothing to do with the real problem.
You are only missing
module.exports = app, or whatever you are exporting. This happened to me many times.