<commit_before>---
title: Quick Start
---

This guide will walk you through the steps to add Skygear to your HTML5 project and Node.js project from scratch.

:::note
Alternatively, you might want to get started with Skygear using:
* [Skygear Scaffolding Template for React-Webpack project](https://github.com/SkygearIO/generator-skygear)
* [JS API Samples Project](https://github.com/SkygearIO/skygear-SDK-JS/tree/master/example)
* [List of JS demo / tutorials at github.com/skygear-demo](https://github.com/search?q=topic%3Askygear-js+org%3Askygear-demo)
:::

## Prerequisite

- A Skygear account. Sign up [here](https://portal.skygear.io/signup).


## Step 1: Install the Skygear JS SDK and configure Skygear

### HTML5 project (CDN)

Add the following lines into the header of your HTML file.

```html5
<!--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>
```

:::note
You can get your server endpoints and the API keys in the _info page_ in your [developer portal](https://portal.skygear.io/apps) after signing up for the [Skygear Cloud Services](https://portal.skygear.io/signup).
:::

### Node.js project

1. Add Skygear to your Node.js project using npm install.

```bash
npm install skygear --save
```

2. Then import skygear in your JS file.

```javascript
import skygear from 'skygear';
```

3. To configure Skygear in your app , add the following lines in the JS file.
```javascript
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);
});
```
:::note
You can get your server endpoints and the API keys in the _info page_ in your [developer portal](https://portal.skygear.io/apps) after signing up for the [Skygear Cloud Services](https://portal.skygear.io/signup).<commit_msg>Minor copywriting revision on Quick start<commit_after>---
title: Quick Start
---

This guide will walk you through the steps to add Skygear to your HTML5 project and Node.js project from scratch.

:::note
Alternatively, you might want to get started with Skygear using:
* [Skygear Scaffolding Template for React-Webpack project](https://github.com/SkygearIO/generator-skygear)
* [JS API Samples Project](https://github.com/SkygearIO/skygear-SDK-JS/tree/master/example)
* [List of JS demo / tutorials at github.com/skygear-demo](https://github.com/search?q=topic%3Askygear-js+org%3Askygear-demo)
:::

## Prerequisite

- A Skygear account. Sign up [here](https://portal.skygear.io/signup).


## Step 1: Install the Skygear JS SDK and configure Skygear

There are two ways you might use Skygear JS SDK:
1. Use the SDK in HTML with CDN
1. Import the [npm package](https://www.npmjs.com/package/skygear)

### Method 1: HTML5 project (CDN)

Add the following lines into the header of your HTML file.

```html5
<!--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>
```

:::note
You can get your server endpoints and the API keys in the _info page_ in your [developer portal](https://portal.skygear.io/apps) after signing up for the [Skygear Cloud Services](https://portal.skygear.io/signup).
:::

### Method 2: Node.js project

1. Add Skygear to your Node.js project using npm install.

```bash
npm install skygear --save
```

2. Then import skygear in your JS file.

```javascript
import skygear from 'skygear';
```

3. To configure Skygear in your app , add the following lines in the JS file.
```javascript
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);
});
```
:::note
You can get your server endpoints and the API keys in the _info page_ in your [developer portal](https://portal.skygear.io/apps) after signing up for the [Skygear Cloud Services](https://portal.skygear.io/signup).
{'fraction_non_alphanumeric': 0.1501679509978265, 'fraction_numerical': 0.0043469670025686625, 'mean_word_length': 4.123481781376518, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 37, 'https://': 25, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7024008', 'n_tokens_mistral': 1704, 'n_tokens_neox': 1646, 'n_words': 533}