Skygear SDK for JavaScript
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Add github issue template Aug 30, 2016
esdoc-plugins/injectTo Update esdoc plugin to esdoc 1.0.1 syntax Aug 3, 2017
example Update example for new record APIs Aug 7, 2018
gulp Update to use gulp-uglify-es Oct 8, 2018
packages Fix pubsub url path Nov 20, 2018
scripts Ensure an empty line between versions in CHANGELOG Aug 24, 2018
.babelrc Convert promise-based function to async/await Jul 5, 2018
.dockerignore Use docker multi-stage build Feb 12, 2018
.editorconfig Add node project scaffolding Aug 21, 2015
.env.example read .env file as in skygear-server May 7, 2017
.eslintrc Convert promise-based function to async/await Jul 5, 2018
.gitattributes Add node project scaffolding Aug 21, 2015
.gitignore Add lerna-debug.log in .gitignore May 17, 2017
.mention-bot Add .mention-bot Sep 12, 2016
.travis.yml Disable deploy example app on master branch Nov 20, 2018
CHANGELOG.md Update CHANGELOG for 1.6.0 Jun 26, 2018
DEVELOPMENT.md Remove nodedev image Feb 15, 2018
Dockerfile Use node:8 docker image Jun 11, 2018
Dockerfile.dev Upgrade npm version in docker image Jul 27, 2018
Dockerfile.onbuild Use node:8 docker image Jun 11, 2018
LICENSE Switch to Apache License 2.0 Dec 16, 2015
Makefile Remove nodedev image Feb 15, 2018
README.md Update README.md (#421) May 24, 2018
docker-compose.yml Add docker-compose service for example site Jul 27, 2018
esdoc.json Update to esdoc to 1.0.1 Aug 3, 2017
gulpfile.js Add License header to source files Dec 16, 2015
index.js Add docker-compose service for example site Jul 27, 2018
lerna.json Update CHANGELOG for 1.6.0 Jun 26, 2018
package-lock.json Update to use gulp-uglify-es Oct 8, 2018
package.json Update to use gulp-uglify-es Oct 8, 2018
portal_rsa.enc Add travis script to upload example to skygeario.com Aug 5, 2016
ssh_config Add travis script to upload example to skygeario.com Aug 5, 2016

README.md

Skygear SDK for JS

npm npm Build Status License

Skygear Server is an opensource serverless backend for making web and mobile app development faster, delegate the backend to Skygear so you can focus at the frontend.

You may try the host version at skygear.io or deploy your own server.

This repo contains the Skygear JS Client SDK (skygear), and skygear-node which enable you to write custom Cloud Functions to extend Skygear capability.

Check out the Quick Start Guide to start using Skygear JS SDK to write your Web / Ionic / React-Native apps.

Besides guides, here is the API doc.

Installation with npm

Simply install via

$ npm install skygear

And you can start configure Skygear in your app:

var skygear = require('skygear');
#import skygear from 'skygear'; #For ES2015

skygear.config({
    'endPoint': 'https://<your-app-name>.skygeario.com',
    'apiKey': '<your-api-key>',
}).then(() => {
    console.log('Container is ready to make API call');
}, (error) => {
    console.log(error);
});

Installation via CDN

Include the following lines into the header of your HTML file:

<!--Skygear CDN-->
<script src="https://code.skygear.io/js/polyfill/latest/polyfill.min.js"></script>
<script src="https://code.skygear.io/js/skygear/latest/skygear.min.js"></script>

<!--Skygear configuration-->
<!--The app end point and the api key can be found in the developer portal-->
<script>
  skygear.config({
    'endPoint': 'https://<your-app-name>.skygeario.com/', // trailing slash is required
    'apiKey': '<your-api-key>',
  }).then(() => {
    console.log('skygear container is now ready for making API calls.');
  }, (error) => {
    console.error(error);
  });
</script>

Running client example

Checkout the source and run the following to launch a local server:

npm install

# run example with demo endpoint
npm run example

# run example with your app endpoint
SKYGEAR_ENDPOINT=https://<your-app-name>.skygeario.com SKYGEAR_API_KEY=<your-api-key> npm run example

Development

Check out [DEVELOPMENT.md].

Pull requests are welcomed!

Report bug on https://github.com/SkygearIO/skygear-SDK-JS/issues

Support

For implementation related questions or technical support, please find us on the official forum or community chat.