The samples in this project demonstrate several uses of Amazon Quantum Ledger Database (QLDB).
For our tutorial, see Node.js and Amazon QLDB.
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.
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:
Install Node.js QLDB driver, and other dependencies using the npm utility:
npm install
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.
TypeDoc is used for documentation. You can generate HTML locally with the following:
npm run doc
- Modify the sample app to use Qldb Node.js Driver v1.0.0
- Modify the sample app to use Qldb Node.js Driver v1.0.0-rc.2
- Modify the sample app to use Qldb Node.js Driver v1.0.0-rc.1
- Initial preview release of the QLDB Node.js Sample Application.
This library is licensed under the MIT-0 License.