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

docs: improve getting started example #79

Merged
merged 1 commit into from
May 27, 2022

Conversation

is2ei
Copy link
Contributor

@is2ei is2ei commented May 27, 2022

Closes #11
I tested the example code in StackBlitz.
https://stackblitz.com/edit/node-str32w?file=index.js

Checklist

README.md Outdated
// `fastify.scheduler` becomes available after initialization.
// Therefore, you need to call `ready` method.
fastify.ready().then(() => {
const task = new AsyncTask(
Copy link
Member

Choose a reason for hiding this comment

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

I would extract task and job definition outside of ready block, as they do not rely on app being up already

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kibertoad
Thanks for your comment. I will fix it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kibertoad
I fixed it. Could you review it again? 🙇
053691f

@kibertoad kibertoad merged commit 2dcc10e into fastify:main May 27, 2022
@kibertoad
Copy link
Member

thank you!

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.

scheduler is undefined
2 participants