bluesmoon/node-geoip — pull request #11 by sajal (2012-05-22 15:15:16+00:00)
Title: ugly way to override data directory

Current interface :-

var GeoIP = require('./external/node-geoip/lib/geoip.js');

New interface :-

global.geodatadir = '/something/somewhere/geodata/'; // Optional override
var GeoIP = require('./external/node-geoip/lib/geoip.js');

I didn't want to add an init and remove your anonymous functions since that would break existing applications. This way existing code will work just fine, and someone who wants to override the data directory can do so by adding to global scope bloat...

My rationale for having separate data directory is to allow for updating directly from maxmind without bloating the repo and using paid version of maxmind which we may do in near future... and doing so without maintaining a fork of node-geoip