Witam
Po wgraniu pliku na heroku i naciśnięciu przycisku Open App pojawia mi się komunikat "Application error
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details.
const peter = new User({
name: 'Peter',
surname: 'Kennedy',
age: 30
});
const martin = new User({
name: 'Martin',
surname: 'Luther',
age: 40
});
const findUsers = function() {
return User.find({}, function(err, res) {
if (err) throw err;
console.log(res);
});
}
const findOnlyUser = function() {
return User.find({ surname: 'Luther' }, function(err, res) {
if (err) throw err;
console.log(res);
})
}
Czy po wgraniu pliku node na heroku i otwarciu aplikacji powinno pojawić się okno jak w terminalu i wyświetlić dane jak w konsoli z funkcji findUsers, findOnlyUser ?