Installing the Amazon QLDB Node.js sample application
Important
End of support notice: Existing customers will be able to use Amazon QLDB until end of support on 07/31/2025. For more details, see
Migrate an Amazon QLDB Ledger to Amazon Aurora PostgreSQL
This section describes how to install and run the provided Amazon QLDB sample application for the step-by-step Node.js tutorial. The use case for this sample application is a department of motor vehicles (DMV) database that tracks the complete historical information about vehicle registrations.
The DMV sample application for Node.js is open source in the GitHub repository aws-samples/amazon-qldb-dmv-sample-nodejs
Prerequisites
Before you get started, make sure that you complete the QLDB driver for Node.js Prerequisites. This includes installing Node.js and doing the following:
-
Sign up for AWS.
-
Create a user with the appropriate QLDB permissions.
-
Grant programmatic access for development.
To complete all of the steps in this tutorial, you need full administrative access to your ledger resource through the QLDB API.
Installation
To install the sample application
-
Enter the following command to clone the sample application from GitHub.
The sample application packages the complete source code from this tutorial and its dependencies, including the Node.js driver and the AWS SDK for JavaScript in Node.js
. This application is written in TypeScript. -
Switch to the directory where the
amazon-qldb-dmv-sample-nodejs
package is cloned.cd amazon-qldb-dmv-sample-nodejs
-
Do a clean install of the dependencies.
npm ci
-
Transpile the package.
npm run build
The transpiled JavaScript files are written in the
./dist
directory. -
Proceed to Step 1: Create a new ledger to start the tutorial and create a ledger.