-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add instructions to run code samples
- Loading branch information
1 parent
80e80f9
commit 7b153b7
Showing
2 changed files
with
35 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Running The AWS Advanced NodeJS Wrapper Code Samples | ||
|
||
### Prerequisites | ||
|
||
- [npm](https://www.npmjs.com/) 9.2.0+ | ||
|
||
### Running a Sample | ||
|
||
Each code snippet in the `/examples/aws_driver_example` can be run from within the project. Each example requires existing databases or AWS resources, and will need the user to edit any credentials or user specific information for the sample to run correctly. | ||
|
||
Prior to running a sample, all prerequisites for the sample must be met. For example, to run the `aws_iam_authentication_mysql_example.ts` file, you must have an IAM user set up and IAM Authentication must be enabled on the database you specify. See the individual [plugin pages](/docs/using-the-nodejs-wrapper/UsingTheNodejsWrapper.md#list-of-available-plugins) for more information. | ||
|
||
Note than for any failover examples, failover will not be triggered. For example, the `aws_failover_mysql_example.ts` sample demonstrates enabling the failover plugin and failover handling, but will not initiate cluster failover on its own. | ||
|
||
To run the sample: | ||
|
||
1. Ensure all prerequisites have been met. | ||
2. Install all required packages with `npm install`. | ||
3. Navigate to the `/examples/aws_driver_example` directory. | ||
4. Run the command `npx tsx <filename>`. For example, to run the `aws_iam_authentication_mysql_example.ts` file, the command would be `npx tsx aws_iam_authentication_mysql_example.ts`. |