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

Replace express examples with h3 #13582

Open
1 of 4 tasks
Barbapapazes opened this issue Jun 21, 2023 · 4 comments
Open
1 of 4 tasks

Replace express examples with h3 #13582

Barbapapazes opened this issue Jun 21, 2023 · 4 comments
Labels
documentation Improvements or additions to documentation

Comments

@Barbapapazes
Copy link

Documentation is

  • Missing
  • Outdated
  • Confusing
  • Not sure?

Explain in Detail

Hello,

Since express is widely outdated in many way (no support for async and await, no update since a while and a v5 still in bêta avec more than 9 years, I think that we could use h3 for this job.

In fact, h3 is very low level, moderne and way more efficient that express.

Your Suggestion for Changes

Still in progress because examples could become more complexe by using this layer

Reproduction

No response

Steps to reproduce

No response

@Barbapapazes Barbapapazes added the documentation Improvements or additions to documentation label Jun 21, 2023
@patak-dev
Copy link
Member

Even if I think h3 (or fastify?) should be promoted, I don't know if it is bad to keep express in our docs a bit more. Maybe we could add a note that we are using express because it is simple and the API is known by more devs, but users are expected to use a modern alternative.

@Barbapapazes
Copy link
Author

Even if I think h3 (or fastify?) should be promoted, I don't know if it is bad to keep express in our docs a bit more. Maybe we could add a note that we are using express because it is simple and the API is known by more devs, but users are expected to use a modern alternative.

Yes, that could be a great first move! Indeed, I agree that the api provided by express is the most easier and the one from fastify or h3 is more difficult for a new dev.

@Shyam-Chen
Copy link
Contributor

Shyam-Chen commented Jun 28, 2023

import fastify from 'fastify';
import middie from '@fastify/middie';

// ...

  const app = fastify();

  await app.register(middie);

// ...

  app.use(vite.middlewares);

@rexhent
Copy link

rexhent commented Jun 27, 2024

Even if I think h3 (or fastify?) should be promoted, I don't know if it is bad to keep express in our docs a bit more. Maybe we could add a note that we are using express because it is simple and the API is known by more devs, but users are expected to use a modern alternative.

Would having both be appropriate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants