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

updated Getting-Started.md - added more detail making the process easier to understand #2352

Merged
merged 19 commits into from Jun 28, 2020
Merged

Conversation

sojohnnysaid
Copy link
Contributor

@sojohnnysaid sojohnnysaid commented Jun 26, 2020

Checklist

  • run npm run test and npm run benchmark
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message and code follows Code of conduct

After hours of frustration and ironically reading Wow, that was fast I came up with this lol. I think this will get people up and running more quickly.
docs/Getting-Started.md Outdated Show resolved Hide resolved
Used more of the original example, added fastify-mongodb as per mcollina's suggestion. Simplified the db call to use findOne without arguments.
removed 'use strict' I had added previously on examples
removed commented about findOne()
@sojohnnysaid
Copy link
Contributor Author

@mcollina i've updated the examples to be more true to the original, added fastify-mongodb and a simpler call to the db.

removed the text to suggest using fastify-mongodb and added fastify-mongodb to the install instruction on line 125. Also updated npm install to npm i to remain consistent with the previous example.
re-added comment about how fastify-plugin exposes the decorators etc...
Changed :id parameter to :name, with simple example to avoid all the ObjectId method confusion.
removed unnecessary await
(oops) replaced hard coded value to request.params.name
changed the parameter again. :name might be just as confusing as :id. Changed it to :animal.
Trying to save people a little time with an example to show all documents and a single document.
more meaningful checks and using await properly
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@sojohnnysaid
Copy link
Contributor Author

Thanks @mcollina! My first PR. 😅

docs/Getting-Started.md Outdated Show resolved Hide resolved
docs/Getting-Started.md Outdated Show resolved Hide resolved
docs/Getting-Started.md Outdated Show resolved Hide resolved
docs/Getting-Started.md Outdated Show resolved Hide resolved
sojohnnysaid and others added 4 commits June 27, 2020 13:48
Co-authored-by: James Sumners <james@sumners.email>
Co-authored-by: James Sumners <james@sumners.email>
Co-authored-by: James Sumners <james@sumners.email>
Co-authored-by: James Sumners <james@sumners.email>
Copy link
Member

@jsumners jsumners left a comment

Choose a reason for hiding this comment

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

LGTM

@mcollina mcollina merged commit 7788b90 into fastify:master Jun 28, 2020
@mcollina
Copy link
Member

Good job and congrats for landing your first PR!

@sojohnnysaid
Copy link
Contributor Author

Thanks and thank you for a great framework!

@github-actions
Copy link

github-actions bot commented Feb 9, 2022

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants