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"
}
Locations
Closest Region
Returns the closest region to the user’s location.
GET
/
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"
}
Response
string
The location code for the server responding.
string
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"
}
Was this page helpful?