This example shows how to use the event.request.geo
object to determine a user's location.
geo: {
city?: string
country?: string
region?: string
}
pnpm create next-app --example https://github.com/vercel/examples/tree/main/edge-middleware/geolocation geolocation
Next, run Next.js in development mode:
pnpm dev
Deploy it to the cloud with Vercel (Documentation).