diff --git a/docs/sdks/web/GETTING_STARTED.md b/docs/sdks/web/GETTING_STARTED.md index 6f34a3dda5..a1d387d7d4 100644 --- a/docs/sdks/web/GETTING_STARTED.md +++ b/docs/sdks/web/GETTING_STARTED.md @@ -10,9 +10,9 @@ Initialize your SDK with your Appwrite server API endpoint and project ID which ```js // Init your Web SDK -const sdk = new Appwrite(); +const client = new Client(); -sdk +client .setEndpoint('http://localhost/v1') // Your Appwrite Endpoint .setProject('455x34dfkj') // Your project ID ; @@ -22,8 +22,10 @@ sdk Once your SDK object is set, access any of the Appwrite services and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the [API References](https://appwrite.io/docs) section. ```js +const account = new Account(client); + // Register User -sdk.account.create('[USER_ID]', 'me@example.com', 'password', 'Jane Doe') +account.create('[USER_ID]', 'me@example.com', 'password', 'Jane Doe') .then(function (response) { console.log(response); }, function (error) { @@ -35,15 +37,17 @@ sdk.account.create('[USER_ID]', 'me@example.com', 'password', 'Jane Doe') ### Full Example ```js // Init your Web SDK -const sdk = new Appwrite(); +const client = new Client(); -sdk +client .setEndpoint('http://localhost/v1') // Your Appwrite Endpoint .setProject('455x34dfkj') ; +const account = new Account(client); + // Register User -sdk.account.create('[USER_ID]', 'me@example.com', 'password', 'Jane Doe') +account.create('[USER_ID]', 'me@example.com', 'password', 'Jane Doe') .then(function (response) { console.log(response); }, function (error) {