Getting started - Managing Network using Azure JavaScript/TypeScript SDK

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

Features

This project framework provides examples for the following services:

Network

Installation

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

    reference :

    nodejs version: >=22
    typescript version: 5.9.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/network
    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 NetworkManagementClient(credential, subscriptionId);
    await virtualNetworks_beginCreateOrUpdateAndWait();
}
```

execute below command on terminal

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

Resources