Share via

Getting started - Managing Redis using Azure JavaScript/TypeScript SDK

These code samples will show you how to manage Redis using Azure SDK for JavaScript/TypeScript.

Features

This project framework provides examples for the following services:

Redis

Installation

  1. Before using the sdk package,we need install nodejs and add it into environment variables.

    reference :

    nodejs version: 14.16.0
    typescript version: 4.1.3
    

Quickstart

  1. Clone the repository.

    git clone https://github.com/Azure-Samples/azure-samples-js-management
    
  2. Install the dependencies using npm.

    cd azure-samples-js-management/samples/redis
    npm i -g typescript
    npm install
    

Demo

A demo app is included to show how to use the project.

To run the complete demo, you need to call the methods you want to test in main method.

```
async function main() {
    client = new RedisManagementClient(credential, subscriptionId);
    network_client = new NetworkManagementClient(credential, subscriptionId);
    await patchSchedules_listByRedisResource();
}
```

execute below command on terminal

```
tsc redis_examples.ts (it will create a same name js file)
node redis_examples.js
```

Resources