Skip to content

Instantly share code, notes, and snippets.



Created Nov 6, 2014
What would you like to do?
// Biblioteca responsável pela conexão no banco de dados
var level = require('levelup');
var config = require(__dirname + '/config');
var db = level(config.get('connection'));
var conns = {
_db: db // Para acesso direto ao LevelDB
conns.find = function(value, callback){
//do something...
// this._db ou db
db.get(value, callback);
module.exports = conns;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment