Skip to content

polRk/ydb-nodejs-sdk

This branch is 112 commits behind ydb-platform/ydb-nodejs-sdk:refs/heads/main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Alexey Zorkaltsev
Aug 5, 2024
aa5799d · Aug 5, 2024
May 20, 2024
Dec 23, 2021
Aug 5, 2024
Sep 4, 2019
Jun 6, 2024
Aug 5, 2024
May 20, 2020
Mar 24, 2024
Apr 10, 2020
Mar 7, 2023
Sep 1, 2023
Jul 4, 2024
May 6, 2024
May 6, 2024
Jul 3, 2024
Sep 4, 2023
Dec 13, 2023
Dec 23, 2021
Jul 5, 2023
Apr 8, 2024
Apr 8, 2024
Apr 8, 2024
Jul 4, 2024
Jul 4, 2024
Mar 7, 2023
Oct 18, 2022
May 20, 2022
Oct 18, 2022
Nov 28, 2022

Repository files navigation

Roadmap

You can take a look at our Roadmap for the near future here.

How to use

Install package from NPM

npm install ydb-sdk

Install dependencies and compile library

npm ci
npm run build

Set environment variables

Variables which should not be set for a specific installation are explicitly set to an empty value, so that startup script correctly detects which installation you are aiming at.

Common variables

export YDB_SDK_LOGLEVEL=debug
export IAM_ENDPOINT= # for Yandex.Cloud, by default it is iam.api.cloud.yandex.net:443

Credential variables

For the typical cases of using these variables, see below:

export YDB_ACCESS_TOKEN_CREDENTIALS= # here comes your token from `yc iam create-token`

export YDB_ANONYMOUS_CREDENTIALS=1 # try anonymous access

export YDB_METADATA_CREDENTIALS=1 #  try local metadata service authentication

export YDB_SERVICE_ACCOUNT_KEY_FILE_CREDENTIALS = # here should be the path to the service account key file from 'yc iam key create --folder-id <folder_id> --service-account-name <sa_name> --output ~/.ydb/sa_name.json'

Access to internal YDB cluster

export YDB_ACCESS_TOKEN_CREDENTIALS= # here comes your oauth token

Access to Yandex.Cloud YDB cluster from local machine

Serverless DB

export YDB_ACCESS_TOKEN_CREDENTIALS= # here comes your token from `yc iam create-token`

Dedicated DB

export YDB_ACCESS_TOKEN_CREDENTIALS= # here comes your token from `yc iam create-token`
export YDB_SSL_ROOT_CERTIFICATES_FILE= # here should be the path to ssl root certificate for YDB installation

Access to Yandex.Cloud YDB cluster from virtual machine

export YDB_SERVICE_ACCOUNT_KEY_FILE_CREDENTIALS= # here should be the path to the service account key file from 'yc iam key create --folder-id <folder_id> --service-account-name <sa_name> --output ~/.ydb/sa_name.json'

Run basic-example script

cd examples
npm ci
npm run build
npm run basic-v1 -- --connection-string grpcs://your.cloud.endpoint.hostname?database=your-cloud-db-name

About

YDB Node.js SDK

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 99.5%
  • Other 0.5%