Skip to content

Instantly share code, notes, and snippets.

@joesavak

joesavak/controller.js

Last active Apr 30, 2018
Embed
What would you like to do?
LoanModel.find({},{},{limit: 4, sort:{timestamp:-1}}).exec(function(error, loans) {
if(error){throw error;}
for (var i = 0; i<loans.length; i++) {
viewModel.loans[i]=loans[i].toObject();
}
res.render('index',viewModel);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.