Created
November 6, 2014 13:55
-
-
Save alanhoff/b7b1394efb92c3a9a46c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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