You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**This SDK is compatible with Appwrite server version 0.7.0. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-web/releases).**
8
+
**This SDK is compatible with Appwrite server version 0.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-web/releases).**
7
9
8
10
Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
9
11
Use the Web SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
@@ -21,20 +23,86 @@ To install via [NPM](https://www.npmjs.com/):
21
23
npm install appwrite --save
22
24
```
23
25
24
-
If you're using a bundler (like [Browserify](http://browserify.org/) or [webpack](https://webpack.js.org/)), you can import the Appwrite module when you need it:
26
+
If you're using a bundler (like [Rollup](https://rollupjs.org/) or [webpack](https://webpack.js.org/)), you can import the Appwrite module when you need it:
25
27
26
28
```js
27
-
import*asAppwritefrom"appwrite";
29
+
import{ Appwrite }from"appwrite";
28
30
```
29
31
30
32
### CDN
31
33
32
34
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:
For you to init your SDK and interact with Appwrite services you need to add a web platform to your project. To add a new platform, go to your Appwrite console, choose the project you created in the step before and click the 'Add Platform' button.
45
+
46
+
From the options, choose to add a **Web** platform and add your client app hostname. By adding your hostname to your project platform you are allowing cross-domain communication between your project and the Appwrite API.
47
+
48
+
### Init your SDK
49
+
Initialize your SDK code with your project ID which can be found in your project settings page.
50
+
51
+
```js
52
+
// Init your Web SDK
53
+
constappwrite=newAppwrite();
54
+
55
+
appwrite
56
+
.setEndpoint('http://localhost/v1') // Your Appwrite Endpoint
57
+
.setProject('455x34dfkj') // Your project ID
58
+
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert
59
+
;
60
+
```
61
+
62
+
### Make Your First Request
63
+
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 section.
0 commit comments