Răsfoiți Sursa

docs: Fix basic-0 tutorial to use ANCHOR_WALLET env var. (#832)

Alan O'Donnell 4 ani în urmă
părinte
comite
efb70ea89d
1 a modificat fișierele cu 12 adăugiri și 3 ștergeri
  1. 12 3
      docs/src/tutorials/tutorial-0.md

+ 12 - 3
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 `<YOUR-PROGRAM-ID>` (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=<YOUR-KEYPAIR-PATH> 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.
 :::