Does any guide for SSR hosting on things like Netlify/Vercel exists? #15744
Replies: 4 comments 2 replies
-
Hi @alihardan, So the main problem is the Vercel configuration. I started with this:
And it actually works fine, but when you browse the page, it shows the javascript code instead of executing... So I think now it has to be converted in a serverless function.
But it doesn't find this file... the vercel error is: Error: The pattern "index.js" defined in Seems that it tries to find the files inside My workaround was creating the api folder with a file inside, let's name it as
And then the vercel.json is:
now... it almost works... no errors found when building and deploying. But when I browse the website it still shows the javascript code, but if I access to /api/app.js it tries to show the website but it's blank with this console error:
In addition to avoid the blank page when browsing the home website I tried to do a rewrite with this:
But not working. Just showing the javascript code. So I'm here without ideas... if anyone can help us, I'm a bit tired of this 😫 |
Beta Was this translation helpful? Give feedback.
-
just replace quasar by express on google: "netlify express", "vercel express", etc Regarding netlify, u would run as a serverless function: The same to vercel: Now, the quasar part of the puzzle: |
Beta Was this translation helpful? Give feedback.
-
Hi @TobyMosque I mean, Quasar already uses Express. After the Quasar build, it already generates the And then using this src-ssr folder it generates the production files in dist/ssr, the file which it has to be executed by node, in But why Vercel does not execute it, it just displays it. Why I have to do more things? The file is already generated and seems it all works fine. On my computer if I run: I imagine I have to do some kind of a bridge between Vercel and this index file but don't know how. You can see my project, is open, just for learning intentions: https://github.com/mpont91/menumkr I'm just forcing the last commit again and again to prevent having tones of commit with same msg.... I'm sorry again, but could you please tell me exactly what I have to change?
|
Beta Was this translation helpful? Give feedback.
-
deploy to Netlify with ssr mode see : #16565 |
Beta Was this translation helpful? Give feedback.
-
Hello, and many thanks to all those who worked on this framework.
I planned to add a small server-side operation to my SPA dashboard. It was easy thanks to express middleware, I can write custom APIs for what I need. But when I tried to deploy it into Vercel, after hours of trying and searching, I did not succeed in hosting SSR mode at Vercel, while Vercel definitely supports this feature due to the existence of Serverless Functions and Edge Functions in their documents.
Integrating Quasar SSR + Vercel Serverless functions is not easy and there is no guide or explanation at all. The only thing I find was #13522, which didn't work for me.
Netlify also supports serverless functions but I didn't succeed to make it work with Quasar SSR.
I understand that this is free software and I have not contributed to it yet. This is just a suggestion, that if dear developers consider it appropriate to include more explanations for this issue. and I would be happy if someone could tell me why it has not been considered yet. I would also be happy if someone could provide some resources for learning how to deploy these projects plus SSR enabled on Netlify/Vercel.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions