From 082111c7bc929a74b84dffdde31bb4e84569cc4b Mon Sep 17 00:00:00 2001 From: Sheikh Mohammad Rakib Date: Wed, 9 Jul 2025 01:08:02 +0600 Subject: [PATCH] Updates Appwrite SDK initialization instructions Updates the React tutorial to include instructions for obtaining and setting the Appwrite endpoint along with the project ID, ensuring correct SDK initialization. --- src/routes/docs/tutorials/react/step-3/+page.markdoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/routes/docs/tutorials/react/step-3/+page.markdoc b/src/routes/docs/tutorials/react/step-3/+page.markdoc index 00fcc732d6..54a8b574e4 100644 --- a/src/routes/docs/tutorials/react/step-3/+page.markdoc +++ b/src/routes/docs/tutorials/react/step-3/+page.markdoc @@ -18,7 +18,7 @@ Head to the [Appwrite Console](https://cloud.appwrite.io/console). If this is your first time using Appwrite, create an account and create your first project. -Then, under **Add a platform**, add a **Web app**. The **Hostname** should be localhost. +Then, under **Add a platform**, add a **Web app**. The **Hostname** should be localhost. {% only_dark %} ![Add a platform](/images/docs/quick-starts/dark/add-platform.png) @@ -31,7 +31,7 @@ You can skip optional steps. # Initialize Appwrite SDK {% #init-sdk %} -To use Appwrite in our React app, we'll need to find our project ID. Find your project's ID in the **Settings** page. +To use Appwrite in our React app, we'll need to find our project ID and endpoint. Find your project's ID and endpoint in the **Settings** page. {% only_dark %} ![Project settings screen](/images/docs/quick-starts/dark/project-id.png) @@ -42,16 +42,16 @@ To use Appwrite in our React app, we'll need to find our project ID. Find your p Create a new file `src/lib/appwrite.js` to hold our Appwrite related code. Only one instance of the `Client()` class should be created per app. -Add the following code to it, replacing `` with your project ID. +Add the following code to it, replacing `` with your project ID and repacing `` with your endpoint ```client-web import { Client, Databases, Account } from "appwrite"; const client = new Client(); client - .setEndpoint("https://.cloud.appwrite.io/v1") + .setEndpoint("ENDPOINT") // Replace with your endpoint .setProject(""); // Replace with your project ID export const account = new Account(client); export const databases = new Databases(client); -``` \ No newline at end of file +```