/amazon-qldb-dmv-sample-nodejs

A DMV based example application which demonstrates how to use QLDB with the QLDB Driver for Node.js

Primary LanguageTypeScriptOtherNOASSERTION

Amazon QLDB Node.js DMV Sample App

license AWS Provider

The samples in this project demonstrate several uses of Amazon Quantum Ledger Database (QLDB).

For our tutorial, see Node.js and Amazon QLDB.

Requirements

Basic Configuration

See Accessing Amazon QLDB for information on connecting to AWS.

See Setting Region page for more information on using the AWS SDK for JavaScript. You will need to set a region before running the sample code.

See Setting credentials for credential configuration options using the AWS Nodejs SDK v3.

TypeScript 3.5.x

The sample code is written in, and requires, TypeScript 3.5.x. It will be automatically installed as a dependency. Please see the link below for more detail on TypeScript 3.5.x:

Installing the Dependencies

Install Node.js QLDB driver, and other dependencies using the npm utility:

npm install

Running the Sample Code

Since the sample code is written in TypeScript, it must first be transpiled in order to be run:

npm run build

The transpiled JavaScript files can be now found in the ./dist directory.

The sample code creates a ledger with tables and indexes, and inserts some documents into those tables, among other things. Each of the examples in this project can be run in the following way:

node dist/CreateLedger.js

The above example will create a ledger named: vehicle-registration. You may run other examples after creating a ledger.

See Getting Started to learn more about the sample app.

Documentation

TypeDoc is used for documentation. You can generate HTML locally with the following:

npm run doc

Release Notes

Release 1.0.0

  • Modify the sample app to use Qldb Node.js Driver v1.0.0

Release 1.0.0-rc.2

  • Modify the sample app to use Qldb Node.js Driver v1.0.0-rc.2

Release 1.0.0-rc.1

  • Modify the sample app to use Qldb Node.js Driver v1.0.0-rc.1

Release 0.1.0-preview

  • Initial preview release of the QLDB Node.js Sample Application.

License

This library is licensed under the MIT-0 License.