update ip2region.js

This commit is contained in:
dongyado 2016-06-28 09:31:23 +08:00
parent 0e498e27f8
commit 2e31e924b5
1 changed files with 4 additions and 1 deletions

View File

@ -6,13 +6,16 @@
* @author dongyado<dongyado@gmail.com> * @author dongyado<dongyado@gmail.com>
* */ * */
var fs = require('fs');
var ip2r = {}; var ip2r = {};
ip2r.db_file = null; ip2r.db_file = null;
ip2r.db_fd = null;
exports.setDbFile = function(path) exports.setDbFile = function(path)
{ {
ip2r.db_file = path; ip2r.db_file = path;
ip2r.db_fd = fs.open(ip2r.db_file);
} }
exports.getDbFile = function(path) exports.getDbFile = function(path)