Code Monkey home page Code Monkey logo

skygear-sdk-js's Introduction

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

Pull requests are welcomed!

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.