{"id":22087446,"url":"https://github.com/technickai/node_geoip_server","last_synced_at":"2025-09-04T07:15:20.072Z","repository":{"id":3076105,"uuid":"4099486","full_name":"TechNickAI/node_geoip_server","owner":"TechNickAI","description":"Node js http server that delivers geoip data","archived":false,"fork":false,"pushed_at":"2012-10-25T18:32:35.000Z","size":192,"stargazers_count":11,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-09T12:28:22.186Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TechNickAI.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}},"created_at":"2012-04-21T20:57:20.000Z","updated_at":"2025-06-05T16:31:34.000Z","dependencies_parsed_at":"2022-08-27T15:19:59.550Z","dependency_job_id":null,"html_url":"https://github.com/TechNickAI/node_geoip_server","commit_stats":null,"previous_names":["technickai/node_geoip_server","gorillamania/node_geoip_server"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/TechNickAI/node_geoip_server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechNickAI%2Fnode_geoip_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechNickAI%2Fnode_geoip_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechNickAI%2Fnode_geoip_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechNickAI%2Fnode_geoip_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TechNickAI","download_url":"https://codeload.github.com/TechNickAI/node_geoip_server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechNickAI%2Fnode_geoip_server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271746516,"owners_count":24813568,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-12-01T02:05:39.346Z","updated_at":"2025-08-23T10:05:51.737Z","avatar_url":"https://github.com/TechNickAI.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Overview\nNode js http server that delivers geoip data via a web service. Once running, the server will\noutput a JSON strong with the users city, state, country, etc. like this:\n\n```\n{\n \"country_code\": \"US\",\n \"country_code3\": \"USA\",\n \"country_name\": \"United States\",\n \"region\": \"CA\",\n \"city\": \"Pleasanton\",\n \"latitude\": 37.66239929199219,\n \"longitude\": -121.89630126953125,\n \"metro_code\": 807,\n \"dma_code\": 807,\n \"area_code\": 925,\n \"continent_code\": \"NA\"\n}\n```\n\nInputs:\n\n* The ip address is determined by looking at the following, stopping once one is found\n    * `?ip=xxx.xxx.xxx.xxx`in the url\n    * `X-Forwarded-For` HTTP header (for proxies). Supports multiple proxies.\n    * IP address of the user via REMOTE_ADDR\n* `callback=$functionName` wrap the result in this callback function for jsonp.\n* `indent=$numSpaces` pretty print the output with this number of spaces. Ex. indent=2\n\n\n## Dependencies\n* The excellent node GeoIP library from kuno: https://github.com/kuno/GeoIP\n* MaxMind's geoip city database, available here:\nhttp://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz\n* Optional: Forever, a utility to keep the service running in production. https://github.com/nodejitsu/forever\n\n\n## Installation\n1. Install node.js - https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager\n1. Install npm - http://npmjs.org/ (run the install.sh as root)\n1. Install the C api from maxmind. Recomend you use use a packagemanager of your choice\nfor your OS instead of compile from source, such as \u003ccode\u003esudo apt-get install geoip-database\u003c/code\u003e or \u003ccode\u003esudo yum install GeoIP\u003c/code\u003e. \nKnown to work with version 1.4.8\n1. Install dependencies for this project:\n    `npm install`\n1. Download and gunzip the latest http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz The default location $repo_root/GeoLiteCity.dat , if you put it somewhere else, specify `--geodb` when starting the service.\n\n1. Run this (from the root of the repo):\n\n\t```\n\tcurl -o GeoLiteCity.dat.gz http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz\\\n   \u0026\u0026 gunzip GeoLiteCity.dat.gz\n   ```\n\n\n## Usage\nIf you are using Forever (recommended):\n\u003ccode\u003eforever start -l forever.log -o out.log -e err.log app.js\u003c/code\u003e\n\nIf you aren't using Forever\n\u003ccode\u003enode app.js\u003c/code\u003e\n\nOptions:\n\u003cpre\u003e\n  --port, -p      port to run the server on                      [default: 9042]\n  --geodb, -g     path to the GeoLiteCity database from MaxMind  [default: \"./GeoLiteCity.dat\"]\n  --help, -h, -?  this help message                              [default: false]\n\u003c/pre\u003e\n\n## Updating the database\nMaxmind updates their city database once a month. Grab the latest one and restart the service. Here's a cron that will do it once a month\n```\n42 0 13 * * cd /path/to/this/repo/ \\\n   \u0026\u0026 curl -o GeoLiteCity.dat.gz http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz\\\n   \u0026\u0026 rm GeoLiteCity.dat\\\n   \u0026\u0026 gunzip GeoLiteCity.dat.gz\\\n   \u0026\u0026 forever restartall\n```\n\n## TODO\n* Unit tests\n* Continuous integration testing with travis-ci\n* Automate the install process\n\n## License\nBSD, see \u003ca href=\"https://github.com/gorillamania/node_geoip_server/blob/master/LICENSE\"\u003eLICENSE\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnickai%2Fnode_geoip_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechnickai%2Fnode_geoip_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnickai%2Fnode_geoip_server/lists"}