Skip to content

Instantly share code, notes, and snippets.

@xenophy
Created September 24, 2011 09:39
Show Gist options
  • Save xenophy/1239163 to your computer and use it in GitHub Desktop.
Save xenophy/1239163 to your computer and use it in GitHub Desktop.
mongodb operation - Next JS 0.8.3
module.exports = {
useTable: 'users',
getUsers : function(fn) {
var me = this;
me.find({}).toArray(function(err, docs) {
fn(docs);
});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment