-
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.
add param checking and removed default values
- Loading branch information
1 parent
6d339cf
commit 49de3c5
Showing
3 changed files
with
171 additions
and
167 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 |
---|---|---|
|
@@ -34,7 +34,7 @@ import { Appwrite } from "appwrite"; | |
To install with a CDN (content delivery network) add the following scripts to the bottom of your <body> tag, but before you use any Appwrite services: | ||
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].4"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].5"></script> | ||
``` | ||
|
||
|
||
|
@@ -50,11 +50,12 @@ Initialize your SDK code with your project ID which can be found in your project | |
|
||
```js | ||
// Init your Web SDK | ||
const sdk = new Appwrite(); | ||
const appwrite = new Appwrite(); | ||
|
||
sdk | ||
appwrite | ||
.setEndpoint('http://localhost/v1') // Your Appwrite Endpoint | ||
.setProject('455x34dfkj') // Your project ID | ||
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert | ||
; | ||
``` | ||
|
||
|
@@ -63,32 +64,35 @@ Once your SDK object is set, access any of the Appwrite services and choose any | |
|
||
```js | ||
// Register User | ||
sdk.account.create('[email protected]', 'password', 'Jane Doe') | ||
.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
appwrite | ||
.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 sdk = new Appwrite(); | ||
const appwrite = new Appwrite(); | ||
|
||
sdk | ||
appwrite | ||
.setEndpoint('http://localhost/v1') // Your Appwrite Endpoint | ||
.setProject('455x34dfkj') | ||
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert | ||
; | ||
|
||
// Register User | ||
sdk.account.create('[email protected]', 'password', 'Jane Doe') | ||
.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
appwrite | ||
.account.create('[email protected]', 'password', 'Jane Doe') | ||
.then(function (response) { | ||
console.log(response); | ||
}, function (error) { | ||
console.log(error); | ||
}); | ||
``` | ||
|
||
### Learn more | ||
|
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
Oops, something went wrong.