sleek.js
Version:
Sleek.js is an MVC wrapper Framework implemented from Node.JS, built-in with base dependency on handlebars.js, express.js. Sleek.js architecture follows common format of MVC which makes it easy to handle and build better web apps with pluggable modules &
21 lines (19 loc) • 446 B
JavaScript
/**
* Sample Model
*
* @package Sleek.js
* @version 1.0
* @author Robin <robin@cubettech.com>
* @Date 23-10-2013
*/
//write function here
var userModel = {
list: function(callback){
var collection =mongodb.collection('usercollections');
// Locate all the entries using find
collection.find().toArray(function(err, results) {
callback(results);
});
}
};
module.exports = userModel;