Use these examples when you run the project locally or deploy your own copy. The official hosted domain keeps the API private for now.
Clone the repository
Run the full API locally with `npm run dev`.
Install the SDK
Point the client at your local or hosted base URL.
GET /api/surahsFetching first 10 surahs from your current deployment...
const API_BASE_URL = process.env.NEXT_PUBLIC_QURAN_API_BASE_URL ?? 'http://localhost:3000';
async function getSurahs() {
const res = await fetch(`${API_BASE_URL}/api/v1/surahs`);
const data = await res.json();
if (data.success) {
return data.data;
}
return [];
}