Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are there any plans on including zip code in the result? #190

Open
kilobyte2007 opened this issue Jan 23, 2020 · 11 comments
Open

Are there any plans on including zip code in the result? #190

kilobyte2007 opened this issue Jan 23, 2020 · 11 comments

Comments

@kilobyte2007
Copy link

I've noticed that in previous versions the result had the zipCode property. What's the reason for getting rid of it and are there plans on bringing it back?

@bluesmoon
Copy link
Collaborator

If it's in the MaxMind data, then it should be present. We haven't removed it.

@kilobyte2007
Copy link
Author

It's not in the result. I actually managed to get it in my fork already- kilobyte2007@f8278e7

Would a pull-request make sense?

@bluesmoon
Copy link
Collaborator

yes

@kilobyte2007
Copy link
Author

There's apparently an issue committing fresh .dat files as they are more than 100MB (~103MB) and that's more than GitHub allows. Any ideas?

@bluesmoon
Copy link
Collaborator

bluesmoon commented Jan 24, 2020 via email

@kilobyte2007
Copy link
Author

I see, but the issue is that the structure of the .dat file changed so now if you will just install the node-geoip module (with my changes) without calling updatedb - it will throw an error.

@agarciapancan
Copy link

So no solution on how to get the zip or postal code back in the response? I recently updated the package and run the update db script and it is gone.

@agarciapancan
Copy link

I found the solution here kilobyte2007@f8278e7 and remember to run the update db script after the changes are made.

@aizenrivki
Copy link

hi @kilobyte2007
why you didn't add PR for this fork?
i see there was a PR for this issue and it closed due to unit-tests didn't pass

@kilobyte2007
Copy link
Author

I did not add a PR because in my solution the .dat file was bigger and it was impossible to commit it.
I ended up using @maxmind/geoip2-node for this and it works flawlessly.

@sapics
Copy link

sapics commented Sep 8, 2024

I have created ip-location-api which has similar in-memory database system with geoip-lite.
You can display "zip code" whose field name is postcode as following

# Update database
npm run updatedb ILA_FIELDS=country,region1,city,metro,eu,timezone,latitude,area,postcode

# application run
node your_application.js ILA_FIELDS=country,region1,city,metro,eu,timezone,latitude,area,postcode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants