maptail is a realtime map view of GeoIP data
Latest commit f255d3b Mar 17, 2012 @stagas Version 0.1.10
Failed to load latest commit information.
bin Unified config. Tweaks. Better defaults Mar 14, 2012
examples Misc improvements Mar 16, 2012
lib Misc improvements Mar 16, 2012
public Misc improvements Mar 16, 2012
.gitignore Clean commit Mar 14, 2012 Clean commit Mar 14, 2012
dummy-extreme.js More options and examples Mar 14, 2012
dummy.js More options and examples Mar 14, 2012
maptail-LICENSE Clean commit Mar 14, 2012
other-LICENCE Clean commit Mar 14, 2012
package.json Version 0.1.10 Mar 16, 2012


maptail is a realtime map view of GeoIP data. Attach it to your server to track visitors, tail a log, pipe to its stdin or use it as a library to build your own implementation. Just emit IP addresses to it from any source and you'll automagically get a cool map with yellow dots and stuff like that streamed in with websockets or whatever transport you'd like to use.


npm install maptail -g

Omit the -g to install as a module.

How to use

The command line tool:

$ maptail -f nohup.out

$ tail -f nohup.out | maptail -h -p 3000

In your server:

var maptail = require('maptail')
var express = require('express')
var app = express.createServer()

app.use('/map', maptail.static())


app.listen(8080, 'localhost')

Let me explain what these are doing here a bit. maptail.track() tracks visitors' IPs and emits them to maptail. maptail.static() is an express.static() middleware that points to our static data (maptail.html, css, etc.)

maptail.attach(app) attaches a simpl WebSocket server which makes it possible for our frontend app to easily subscribe to the GeoIP data events sent by maptail and display them on the map.

If for example you don't want to track visitors of the http server but instead you want to send IPs from another source, you can easily remove maptail.track() from the middleware and use maptail.emit('ip', ipAddress[, logMessage]) to feed our map. It will take care the rest for you.


This is based on mape's wargames.

geoip-lite by Philip Tellis.

Earlier versions used kuno's GeoIP module but since it now uses a C library, I couldn't use it.

MaxMind for their free to use GeoIP data.


maptail is MIT/X11. The rest of the components are of their respective licences.