# Installation

## Prerequisites

| NodeJS                                                                                                                                                                      | Deno                                                                                                           |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| <p>\* Your server/device must have an access to the internet.<br>\* <strong>Node.js</strong>: version 6.0.0 or later<br>\* <strong>NPM</strong>: version 3.0.0 or later</p> | <p>\* Your server/device must have an access to the internet.<br>\* <strong>Deno</strong>: 1.10.3 or later</p> |

## Installation Guide

### NodeJS

You can add the SDK as a dependency using [NPM](https://www.npmjs.com/package/@flagship.io/js-sdk) or [YARN](https://yarn.pm/@flagship.io/js-sdk)

```shell
yarn add @flagship.io/js-sdk
```

```shell
npm install @flagship.io/js-sdk
```

### CDN

You can also install via a CDN

```html
<script src="https://cdn.jsdelivr.net/npm/@flagship.io/js-sdk/dist/index.browser.js"></script>
```

### Deno

For Deno, there are 2 methods:

* Use URLs for dependency management, just add the deno.land URL

```typescript
import { Flagship } from "https://deno.land/x/flagship_io_js_sdk/mod.ts";
```

* Or use [import maps](https://github.com/WICG/import-maps)

```json
{
   "imports": {
      "@flagship.io/js-sdk": "https://deno.land/x/flagship_io_js_sdk/mod.ts"
   }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.abtasty.com/server-side/sdks/js-sdk/archived-versions/archived-js-v40x/archived-js-v40x-installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
