code: function middlewareFunction (req,res,next){
  
    return ipToLocation(req.ip)
      .then(function (location) {
        req.location = location;
        next();
      })
      .catch(function (error) {
        req.locationError = error;
        next();
      })
  
  }
docs: Middleware Function for the IP
  @param {Request} req
  @param {Response} res
  @param {function} next