From efb70ea89d8bbdad0922db4db2af32786bd19686 Mon Sep 17 00:00:00 2001 From: Alan O'Donnell Date: Mon, 4 Oct 2021 10:38:40 -0700 Subject: [PATCH] docs: Fix basic-0 tutorial to use ANCHOR_WALLET env var. (#832) --- docs/src/tutorials/tutorial-0.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/src/tutorials/tutorial-0.md b/docs/src/tutorials/tutorial-0.md index 483dc3d96..6cae14e16 100644 --- a/docs/src/tutorials/tutorial-0.md +++ b/docs/src/tutorials/tutorial-0.md @@ -131,10 +131,19 @@ Notice how we dynamically created the `initialize` method under the `rpc` namespace. Now, make sure to plugin your program's address into `` (a mild -annoyance that we'll address next), and run +annoyance that we'll address next). In order to run the client, you'll also need the path +to your wallet's keypair you generated when you ran `solana-keygen new`; you can find it +by running ```bash -node client.js +solana config get keypair +``` + +Once you've got it, run the client with the environment variable `ANCHOR_WALLET` set to +that path, e.g. + +```bash +ANCHOR_WALLET= node client.js ``` You just successfully created a client and executed a transaction on your localnet. @@ -155,7 +164,7 @@ automatically updated to reflect the latest deployment, making it easy to change your program, update your JavaScript, and run your tests in a fast feedback loop. ::: tip NOTE -For now, the workspace feature is only available when running the `anchor test` command, +For now, the workspace feature is only available when running the `anchor test` command, which will automatically `build`, `deploy`, and `test` all programs against a localnet in one command. :::