Skip to content

Instantly share code, notes, and snippets.

@hink
Created July 17, 2012 22:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hink/3132577 to your computer and use it in GitHub Desktop.
Save hink/3132577 to your computer and use it in GitHub Desktop.
getIpData = (req, res, next) ->
o = {}
if req.params.host?
o.ip = req.params.host
if not isIp o.ip
o.error = 'Invalid IP Address'
req.ipData = o
next()
else
o.ip = determineIp req
async.parallel [
# GEOIP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment