geoip-lite&#39;);

module.exports = ctx =&gt; {
  ctx.geo = geoip.lookup(ctx.ip);
};

// {
//   range: [ 3531655168, 3531657215 ],
//   country: &#39;JP&#39;,
//   region: &#39;24&#39;,
//   eu: &#39;0&#39;,
//   timezone: &#39;Asia/Tokyo&#39;,
//   city: &#39;Yokkaichi&#39;,
//   ll: [ 34.9667, 136.6167 ],
//   metro: 0,
//   area: 50
// }
</code></pre>
<h2 id="url">.url</h2>
<p>The full cuantified URL:</p>
<pre><code class="language-js">const mid = ctx =&gt; {
  expect(ctx.url).toBe(&#39;/hello?answer=42&