-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,12 +50,11 @@ Initialize your SDK code with your project ID which can be found in your project | |
|
||
```js | ||
// Init your Web SDK | ||
const appwrite = new Appwrite(); | ||
const sdk = new Appwrite(); | ||
|
||
appwrite | ||
sdk | ||
.setEndpoint('http://localhost/v1') // Your Appwrite Endpoint | ||
.setProject('455x34dfkj') // Your project ID | ||
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert | ||
; | ||
``` | ||
|
||
|
@@ -64,35 +63,32 @@ Once your SDK object is set, access any of the Appwrite services and choose any | |
|
||
```js | ||
// Register User | ||
appwrite | ||
.account.create('[email protected]', 'password', 'Jane Doe') | ||
.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
sdk.account.create('[email protected]', 'password', 'Jane Doe') | ||
.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
|
||
``` | ||
|
||
### Full Example | ||
```js | ||
// Init your Web SDK | ||
const appwrite = new Appwrite(); | ||
const sdk = new Appwrite(); | ||
|
||
appwrite | ||
sdk | ||
.setEndpoint('http://localhost/v1') // Your Appwrite Endpoint | ||
.setProject('455x34dfkj') | ||
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert | ||
; | ||
|
||
// Register User | ||
appwrite | ||
.account.create('[email protected]', 'password', 'Jane Doe') | ||
.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
sdk.account.create('[email protected]', 'password', 'Jane Doe') | ||
.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
``` | ||
|
||
### Learn more | ||
|