-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Make SSR create
function async
#17235
Comments
I second this. In the docs, it says that you can use anything you want for your backend server, yet in practice there are obstacles to doing this:
Quasar SSR seems too opinionated towards Express at the moment. It's just too much hustle to try and fight it in order to use Fastify. I might try Nuxt with Fastify on future SSR projects. |
The "create" function can be async in q/app-vite 2.0.0-beta.16 (unreleased yet). |
Improvements will be available in q/app-vite 2.0.0-beta.16 |
…rver & middleware changes from q/app-vite #17235
In order to use Fastify with SSR, you would need to use a compatibility layer such as
@fastify/middie
or@fastify/express
. That is because Quasar uses and expects connect/express-like middleware. However, the registration process for those plugins is async, which is problematic ascreate
is expected to be synchronous.https://github.com/fastify/middie#usage
For the dev web server, we should be able to just put an
await
here:quasar/app-vite/lib/modes/ssr/ssr-devserver.js
Line 317 in 36146ba
For the production web server, we should be able to move the create call and app interaction logic into
isReady
which is async.quasar/app-vite/templates/entry/ssr-prod-webserver.mjs
Lines 147 to 160 in 36146ba
The text was updated successfully, but these errors were encountered: