-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added some notes to README
’s and .env.sample
’s
#466
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not close enough to the daily usage to approve or disapprove, just leaving some comments :)
apps/api/.env.example
Outdated
ALGOD_SERVER= ;e.g. http://localhost | ||
ALGOD_PORT= ;e.g. 4001 | ||
ALGOD_TOKEN= ;e.g. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | ||
ALGOD_ENV= ;e.g. testnet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Someone new to this might not realize that something like that ALGOD_TOKEN is actually valid (for dev). Is there a downside to just defining the dev defaults as opposed to showing the ;e.g.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not that I'm aware and I'm happy to update if there are no objections
CMS_URL=http://localhost:8055 | ||
|
||
# Web app configuration | ||
WEB_URL=http://localhost:3000 | ||
|
||
# Circle API configuration | ||
CIRCLE_API_KEY= | ||
|
||
CIRCLE_API_KEY= ;create a free circle account to generate a key | ||
CIRCLE_URL=https://api-sandbox.circle.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we are already using dev defaults in some places. That's preferred IMO but that might just be a taste thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CIRCLE_API_KEY
has to be unique per project so we can't default one here, might suggest linking directly to the signup page where a sandbox key can be provisioned freely for development purposes (https://my-sandbox.circle.com/signup)
apps/api/.env.example
Outdated
|
||
# Used for passphrase encryption | ||
SECRET= | ||
|
||
SECRET= ;any string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we recommend a min length or maybe something obfuscated? This one seems important for something like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing we frequently use to generate keys on the fly is:
$ openssl rand -hex 32 | pbcopy
Which will generate something like: 5f6a12942bb2c44eb70cf1b71ef1c211cc2d966981f76e6315bd086fe54cac16
. Could be worth mentioning at the top of the .env file — or not. Just a good thing to be aware of!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh that's awesome, I'll definitely add that in!
apps/api/.env.example
Outdated
|
||
# Used to generate blockchain assets | ||
CREATOR_PASSPHRASE= | ||
|
||
# Currency for application - needs to match the web env file and the CMS currency field. | ||
CURRENCY= | ||
|
||
CURRENCY= ;e.g. USD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would one or two other options look like? Euros, pesos?
Optionally, you can also fund your wallet from here to be able to perform transactions in the app: | ||
|
||
- List the accounts that currently exist in your sandbox | ||
|
||
```bash | ||
./sandbox goal account list | ||
``` | ||
|
||
- You should see several accounts, some with _microAlgos_, and the account with the address you created above likely having 0. You can run the following command to fund the account you just created with microAlgos | ||
|
||
```bash | ||
./sandbox goal clerk send -a <AMOUNT> -f <FROM_ADDRESS> -t <TO_ADDRESS> | ||
|
||
# Note: Something like 1000000 microAlgos as the amount should be more than plenty to cover transactions | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very helpful addition, thank you.
Optionally, you can seed the database to generate dummy content. | ||
|
||
```bash | ||
# While the server is runnning: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a subtle change but a good one. Most people go straight to the code and that's a good reminder 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff! Thank you for adding to this. It's always helpful to have a fresh set of eyes!
Motivation: This PR updates some notes in the README files and adds some examples to the
.env
sample files to add more clarity around the setup process