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

This commit is contained in:
Alan O'Donnell 2021-10-04 10:38:40 -07:00 committed by GitHub
parent 6eead5669e
commit efb70ea89d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 3 deletions

View File

@ -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.
:::