anjia0532 / lua-resty-maxminddb

A Lua library for reading MaxMind's Geolocation database
Apache License 2.0
97 stars 30 forks source link

Suggestion to make this usable by other context #26

Closed shukitchan closed 4 years ago

shukitchan commented 4 years ago

Hi, First off, thanks so much by this project. I find it useful and the code is very solid.

I would like to use this in other contexts, though (other than nginx). i.e. other platforms programmable through a luajit integration. I find that i need to make the following changes to make it work.

https://gist.github.com/shukitchan/dc63b60e5d9c519b540390531d06ece3

Would you consider to reorganize your code a little bit so that it can be used easily in other luajit environments. Thanks.

anjia0532 commented 4 years ago

follow your code https://github.com/anjia0532/lua-resty-maxminddb/commit/d00c9f32224b4603f2e049b1edf2ddee9dd5b1bc

btw ,you can commit a new PR for this issues.

shukitchan commented 4 years ago

Looks good. Thanks.