1
0
Fork 0
mirror of synced 2024-07-07 23:46:11 +12:00
appwrite/app/sdks/js/README.md

55 lines
1.7 KiB
Markdown
Raw Normal View History

2019-10-09 23:41:25 +13:00
# Appwrite SDK for JavaScript
2019-05-09 18:54:39 +12:00
![License](https://img.shields.io/github/license/appwrite/sdk-for-js.svg?v=1)
2019-12-24 03:12:05 +13:00
![Version](https://img.shields.io/badge/api%20version-0.4.0-blue.svg?v=1)
2019-05-09 18:54:39 +12:00
2019-12-08 09:32:15 +13:00
**This SDK is compatible with Appwrite server version 0.4.0. For older versions, please check previous releases.**
2019-10-02 07:10:33 +13:00
2019-05-09 18:54:39 +12:00
Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
2019-08-23 05:20:27 +12:00
![Appwrite](https://appwrite.io/images/github.png)
2019-05-09 18:54:39 +12:00
## Installation
2019-10-09 23:41:25 +13:00
### NPM
2019-05-09 18:54:39 +12:00
To install via [NPM](https://www.npmjs.com/):
```bash
npm install appwrite --save
```
2019-10-10 07:55:28 +13:00
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:
2019-10-09 23:41:25 +13:00
```js
import * as Appwrite from "appwrite";
```
### CDN
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:
2019-10-04 20:50:20 +13:00
```html
2019-12-08 09:32:15 +13:00
<script src="https://cdn.jsdelivr.net/npm/appwrite@1.0.28"></script>
2019-10-04 20:50:20 +13:00
```
2019-10-10 07:55:28 +13:00
## Getting Started
Initialise the Appwrite SDK in your code, and setup your API credentials:
```js
// Init your JS SDK
var appwrite = new Appwrite();
appwrite
.setEndpoint('http://localhost/v1') // Set only when using self-hosted solution
.setProject('455x34dfkj') // Your Appwrite Project UID
;
```
2019-10-14 09:19:06 +13:00
2019-05-09 18:54:39 +12:00
## License
2019-10-04 06:58:18 +13:00
Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.