Skip to content
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

Add quick start example #25

Merged
merged 5 commits into from
Sep 13, 2024
Merged

Add quick start example #25

merged 5 commits into from
Sep 13, 2024

Conversation

ifavo
Copy link
Contributor

@ifavo ifavo commented Sep 10, 2024

This PR aims to simplify the start for impatient developers on the app template:

  • Adds a QuickStart.md with reduced information and a single snippet to get started
  • Documents the links that will be available
  • Defaults the log dir, to use less config variables

@ifavo ifavo requested a review from a team as a code owner September 10, 2024 10:20
QuickStart.md Outdated
Comment on lines 12 to 23
yarn set version classic
yarn install
yarn contracts:solo-up
yarn contracts:deploy:solo

PORT=3000 \
ORIGIN="*" \
OPENAI_API_KEY="sk-proj-.." \
ADMIN_MNEMONIC="denial kitchen pet squirrel other broom bar gas better priority spoil cross" \
NETWORK_URL=http://localhost:8669 \
REWARD_AMOUNT=1 \
yarn dev
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like the idea of the quickstart! But

OPENAI_API_KEY="sk-proj-.." would configure the backend with a wrong API key

Users might mistake the steps as a copy and paste and everything will work.

Possible solution could be adding the "Result" section of the Quickstart below the Readme here:
image

Copy link
Member

@pierobassa pierobassa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding Request Change

@ifavo
Copy link
Contributor Author

ifavo commented Sep 13, 2024

Possible solution could be adding the "Result" section of the Quickstart below the Readme here:

👋 not sure what you mean by that. Would this be adding the link table to the first section?

I agree with the potential copy & paste misunderstanding. It is stated at the top as required variable.

I went back with my original frustration about the required amount of ENV and found that envalid is used to verify PORT and NODE_ENV only.
I've modified it slightly to verify all the ENV and also use the verified ENV. In the process adjusted, it now also sets some default values and has an OpenAPI-Key verifier, that informs the user where to obtain one.

What do you think about the change?

@pierobassa
Copy link
Member

Possible solution could be adding the "Result" section of the Quickstart below the Readme here:

👋 not sure what you mean by that. Would this be adding the link table to the first section?

I agree with the potential copy & paste misunderstanding. It is stated at the top as required variable.

I went back with my original frustration about the required amount of ENV and found that envalid is used to verify PORT and NODE_ENV only. I've modified it slightly to verify all the ENV and also use the verified ENV. In the process adjusted, it now also sets some default values and has an OpenAPI-Key verifier, that informs the user where to obtain one.

What do you think about the change?

Nice catch! Could you have a reference to the Quickstart.md in the Readme.md too?

@ifavo
Copy link
Contributor Author

ifavo commented Sep 13, 2024

I did add a link to the README, hope its what you expect. Feel free to adjust the way you like to see it!

@pierobassa pierobassa self-requested a review September 13, 2024 18:10
@pierobassa pierobassa merged commit da3504a into vechain:main Sep 13, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants