Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.

docs: server routes streaming, configuration access, query access, etc#4401

Merged
pi0 merged 10 commits intonuxt:mainfrom
maciej-jezierski:docs/server-route-example
Apr 22, 2022
Merged

docs: server routes streaming, configuration access, query access, etc#4401
pi0 merged 10 commits intonuxt:mainfrom
maciej-jezierski:docs/server-route-example

Conversation

@maciej-jezierski
Copy link
Contributor

🔗 Linked issue

nuxt/nuxt#13749

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Resolves issue nuxt/nuxt#13749. Showcase of server routing usage:

  • stream
  • config
  • promise
  • how to get query parameters

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@netlify
Copy link

netlify bot commented Apr 16, 2022

Deploy Preview for nuxt3-docs ready!

Name Link
🔨 Latest commit 12a66ad
🔍 Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/6262d004af96e80008e6904f
😎 Deploy Preview https://deploy-preview-4401--nuxt3-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@DamianGlowala
Copy link
Member

Hi @maciej-jezierski, FYI documentation neither uses semicolons, nor double quotes (for wrapping strings in JS/TS code snippets). It might have been the linter you're using that changed them all. Good to keep an eye on it for the future PRs.

You have also got some async functions without an await keyword in the body - is it intentional or shall these be removed?

@maciej-jezierski
Copy link
Contributor Author

Hi @DamianGlowala , thanks for review. Indeed I didn't notice I had prettier plugin enabled. All not necessary changes are rolled back now and rest of the code is conducted to this standard. I also removed not necessary async keyword (functions were copied from bigger project..)

@DamianGlowala
Copy link
Member

Looks great! I'll leave the technical review to people who know this stuff better :) My very last suggestion would be to make the code indentation the same across all of the code snippets (2 spaces). Some of these appear to have 4.

@DamianGlowala
Copy link
Member

Just by looking at this PR, I'd suggest an idea of standardising the casing for the section headlines across the whole documentation, as there's currently a healthy mix of both. Given the example of this section alone, we got both pascal case headlines and these which only begin with uppercase. 'Handling Requests with Body' next to 'Using a nested router' looks a bit odd.

image

@atinux
Copy link
Member

atinux commented Apr 20, 2022

By looking at other places, you can remove the uppercase expect on the first word or acronyms.

@pi0
Copy link
Member

pi0 commented Apr 22, 2022

Good point DamianGlowala I think we can move them to usage examples:

image

BTW this page is getting more like an API reference. We need to find a way to auto generate utils with each example to API section.

@pi0 pi0 merged commit e3d41a7 into nuxt:main Apr 22, 2022
@pi0
Copy link
Member

pi0 commented Apr 22, 2022

Thanks for the PR @maciej-jezierski 👍🏼

pi0 pushed a commit that referenced this pull request Apr 22, 2022
@pi0 pi0 mentioned this pull request May 2, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants