Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 761 Bytes

closest-region.mdx

File metadata and controls

46 lines (34 loc) · 761 Bytes
title description sidebarTitle api
Closest Region
Returns the closest region to the user's location.
Closest Region

Response

The location code for the server responding. The location code for the client request.
curl https://region.turso.io
import { createClient } from "@tursodatabase/api";

const turso = createClient({
  org: "...",
  token: "",
});

const { server, client } = await turso.locations.closest();
{
  "server": "lhr",
  "client": "lhr"
}