{"id":16738670,"url":"https://github.com/runk/node-geolite2","last_synced_at":"2025-04-04T07:08:55.972Z","repository":{"id":10584216,"uuid":"66246303","full_name":"runk/node-geolite2","owner":"runk","description":"Maxmind's GeoLite2 Free Databases Helper","archived":false,"fork":false,"pushed_at":"2025-01-01T01:29:02.000Z","size":142,"stargazers_count":63,"open_issues_count":3,"forks_count":18,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-02T23:33:07.291Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/runk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-22T06:38:28.000Z","updated_at":"2025-03-30T00:16:18.000Z","dependencies_parsed_at":"2024-05-01T01:35:23.317Z","dependency_job_id":"cf7d51a6-08bf-4f4f-ace3-817e0e694921","html_url":"https://github.com/runk/node-geolite2","commit_stats":{"total_commits":87,"total_committers":11,"mean_commits":7.909090909090909,"dds":0.6436781609195402,"last_synced_commit":"139d058347ffad8c34fb836720fc95c7d6f2d278"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runk%2Fnode-geolite2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runk%2Fnode-geolite2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runk%2Fnode-geolite2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runk%2Fnode-geolite2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/runk","download_url":"https://codeload.github.com/runk/node-geolite2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247135144,"owners_count":20889421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T00:32:06.313Z","updated_at":"2025-04-04T07:08:55.918Z","avatar_url":"https://github.com/runk.png","language":"JavaScript","readme":"# node-geolite2\n\nMaxmind's GeoLite2 Free Databases download helper.\n\n## Configuration\n\n### Access Key\n\n**IMPORTANT** You must set up `MAXMIND_ACCOUNT_ID` and `MAXMIND_LICENSE_KEY` environment variables to be able to download databases. To do so, go to the https://www.maxmind.com/en/geolite2/signup, create a free account and generate new license key.\n\nIf you don't have access to the environment variables during installation, you can provide config via `package.json`:\n\n```jsonc\n{\n  ...\n  \"geolite2\": {\n    // specify the account id\n    \"account-id\": \"\u003cyour account id\u003e\",\n    // specify the key\n    \"license-key\": \"\u003cyour license key\u003e\",\n    // ... or specify the file where key is located:\n    \"license-file\": \"maxmind-license.key\"\n  }\n  ...\n}\n```\n\nBeware of security risks of adding keys and secrets to your repository!\n\n**Note:** For backwards compatibility, the account ID is currently optional. When not provided we fall back to using legacy Maxmind download URLs with only the license key. However, this behavior may become unsupported in the future so adding an account ID is recommended. \n\n### Selecting databases to download\n\nYou can select the dbs you want downloaded by adding a `selected-dbs` property on `geolite2` via `package.json`.\n\n`selected-dbs` must be an array of strings, one or more of the values `City`, `Country`, `ASN`.\n\nIf `selected-dbs` is unset, or is set but empty, all dbs will be downloaded.\n\n```jsonc\n{\n  ...\n  \"geolite2\": {\n    \"selected-dbs\": [\"City\", \"Country\", \"ASN\"]\n  }\n  ...\n}\n```\n\n## Usage\n\n```javascript\nvar geolite2 = require('geolite2');\nvar maxmind = require('maxmind');\n\nvar lookup = maxmind.openSync(geolite2.paths.city); // or geolite2.paths.country or geolite2.paths.asn\nvar city = lookup.get('66.6.44.4');\n```\n\n## Alternatives\n\n[geolite2-redist](https://github.com/GitSquared/node-geolite2-redist) provides redistribution which does not require personal license key. Make sure you understand legal terms and what they mean for your use-case.\n\n## License\n\nCreative Commons Attribution-ShareAlike 4.0 International License\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunk%2Fnode-geolite2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frunk%2Fnode-geolite2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunk%2Fnode-geolite2/lists"}