question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Explore replacing express with fastify in dev server

See original GitHub issue

Is your feature request related to a problem? Please describe Serving content via http2 is beneficial and greatly improves load times when serving many files. This is the case when using using a no-bundler such as the builder-vite plugin

When using builder-vite, file count can easily exceed 1k files. This causes load times to be 🐌 . We can alleviate this by enabling http2 when appropriate.

Describe the solution you’d like When running storybook with https enabled:

# optionally we can also autogenerate the selfsigned cert
# maybe take inspiration from the selfsigned package on npm
start-storybook --https --ssl-cert selfsigned.crt --ssl-key selfsigned.key

storybook assets are served via http2

Describe alternatives you’ve considered Accept http1.1 bottleneck

Are you able to assist to bring the feature to reality? yes, I can…

Additional context

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
IanVScommented, Jul 27, 2022

Status update: I had fastify working briefly, before rebasing onto the latest next which now uses tsup, which I’m having some problems with. I’ve pushed up a WIP branch: https://github.com/storybookjs/storybook/tree/fastify. There’s more that needs to be done, but until I can figure out how to deal with errors I’m getting from https://github.com/egoist/tsup/issues/14, I’m a bit stuck. The fastify-webpack-hot issue turned out to be solved, though, since in the new branch we’re not running multiple versions of webpack at the same time, now that the manager is pre-bundled.

2reactions
IanVScommented, Apr 27, 2022

Awesome, thanks! I think if nothing else, it would set us up well for http3/quic, which does appear to have real perf benefits and seems to be getting some activity in node. And fastify will likely add support much faster than express, given the relative pace of development between the two. So yeah, in my opinion this is a good exploration regardless of http2 perf.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Migrate Your App from Express to Fastify
Learn what makes Fastify a great alternative, and how to migrate an existing Node.js app from Express to Fastify.
Read more >
Speed up your next Node.js API with Fastify instead of ...
This makes it easy for Express developers to quickly jump over to Fastify and stay productive. So it's an easy replacement with a...
Read more >
fastify.js equivalent of express next() for Node server
The equivalent would be: app.get('/route1', function(request, reply) { ... } Where request and reply are the Fastify custom object.
Read more >
Build a CRUD API with Fastify
Fastify is an alternative of Express (L express) which you must have heard of if you are familiar with NodeJS before. In fact,...
Read more >
Forget Express.js — opt for these alternatives instead
If you're working on a new project written in Node that acts as a web server, don't default to the familiar Express.js. Explore...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found