This repository accompanies Anon's setup guides at the Anon docs.
To run these examples, you'll need credentials from Anon. You can request access here.
To get started, clone the repository.
git clone https://github.com/anon-dot-com/examples.git && cd ./examples
Each sample has a .env.template
file that you should copy to a new file called .env
in the same directory. Fill in the environment variables with the credentials Anon provided you.
At minimum, the .env
file should have the following variables:
ANON_ENV=sandbox
NPM_TOKEN=...
ANON_API_KEY=...
ANON_SDKCLIENT_ID=...
ANON_APP_USER_ID_TOKEN=...
ANON_APP_USER_ID=...
Then, source the .env
file.
source .env
NOTE:
.env
files are a convenient local development tool. Never run a production application using an environment file with secrets in it.
You can quickly test out Anon by connecting a user session (examples prefixed connect-*
), then running a user session (examples prefixed run-*
).
For example, run our Web Link - React example, followed by our Backend SDK - Typescript example. You could tweak the Typescript example with your own Playwright sessions to test Anon for your use case.
To try out an example, cd
into one of the folders and follow the instructions in the corresponding README
. Enjoy!