# TypeScript / JavaScript SDK

## Overview

The generated Neurelo TypeScript/JavaScript for NodeJS SDK provides easy access to your Neurelo APIs for your applications.

## Installation

* [Download the Typescript / Javascript SDK for your project](https://docs.neurelo.com/sdks)
* Install the SDK:

  `npm i ./neurelo-sdk-typescript-cmt_<id>.tgz`
* Commit the `.tgz` file along with the package.json and package-lock.json

## Getting Started

Neurelo's TypeScript / JavaScript SDK expects two environment variables to be configured:

* `NEURELO_API_BASE_PATH`&#x20;
  * This is the endpoint for the region where your environment is running, for example, if your environment is running in Neurelo's `us-east-2` gateway, the value for this variable should be `https://us-east-2.aws.neurelo.com`
* `NEURELO_API_KEY`
  * This is the API key generated for your environment under the API Keys tab.

<details>

<summary>Replacing or modifying Neurelo's HTTP Client</summary>

To replace Neurelo's [Axios](https://www.npmjs.com/package/axios) client, you can create a `neurelo.config.ts` or `neurelo.config.js` file in your project's root directory. The configuration file should export a named variable called `customAxios` with your new Axios instance.

</details>

Once you've installed and configured your Neurelo SDK, you're ready to import the generated services into your application for use.&#x20;

For example, if a data definition had an Address object present, we would be able to import the `AddressApiService` and utilize various methods to interact with the application's data, as is shown below:

```typescript
import { AddressApiService } from 'neurelo-sdk';

try {
    const response = await AddressApiService.findAddress();
    const addresses = response.data.data;
    
    console.log(addresses);
} catch (error) {
    console.error('Failed to retrieve list of addresses', error);
}
```

For further documentation on the operations available for each of your objects, or how to construct parameters like Select or Where inputs, please see the documentation available inside the 'Docs' tab under the 'Definitions', or under the 'APIs' tab of the 'Environments' of your project

To review an example of an application built using Neurelo's SDK, please visit [#projects-built-using-neurelo-sdks](https://docs.neurelo.com/project-examples#projects-built-using-neurelo-sdks "mention")&#x20;
