Tail GeoIP data on a world map in realtime.
npm i -g maptail# pipe logs into maptail
tail -f my-logs | maptail
# open the UI at http://localhost:3000--silent: suppress stdout output--logs: show logs on screen (default: true)--port <port>: port to listen on (default: env PORT or 3000)
You can embed maptail into an existing Node/Express HTTP server via a reusable middleware. It will intercept all writes to stdout (i.e from your logs) and serve the UI to the specified endpoint.
import express from 'express'
import morgan from 'morgan'
import { maptail } from 'maptail'
const app = express()
app.use(morgan('combined'))
app.use(maptail('/maptail'))
app.listen(3000, () => {
console.log('Server listening on http://localhost:3000')
})maptail uses the IP2Location LITE database for IP geolocation.
MIT
