How do I use primo with cloudflare pages?

This might be stupid but how do I use primo? In their docs they use vercel/netlify and input project api keys from supabase into vercel/netlify. Here are the docs: https://docs.primocms.org/getting-started How would I achieve the same in cloudflare pages? I'm assuming all three are just ways to host static websites, except vercel which I believe can host dynamic websites too. I don't get why primo needs supabase anyway, I assume it's just some database management software. Please correct me if I've made a mistake.
Primo Docs: Getting Started
You can download Primo as a desktop application or host it from any static host.
9 Replies
z0rrn
z0rrn8mo ago
Primo is no ordinary static site, it uses Functions/Lambda/Workers to do things not possible in the Browser (these are little JavaScript files which get executed on every request). This is supported by Vercel, Netlify and Cloudflare (but with different usage limits, in my opinion cf has the highest). This is what you call dynamic websites. Primo needs Supabase to store information (so-called state) because each of these functions are stateless (they store no information). To deploy Primo on Cloudflare, follow step 2 and 3, then create a new Cloudflare Pages project. Choose your desired Subdomain. In the next screen choose the SvelteKit Template. Now configure the Environment Variables under the Environment Variables Dropdown (the Video shows how to access them in Supabase). Now your project should be deployed normally like on Vercel. If you have any other questions or issues, do not hesitate to ask. We'll help you!
foo9ar
foo9arOP8mo ago
Thank you so much for your explanation! That clears things up. I set up a new GitHub repo to use the sveltekit template but then I found this under the Integrations (Beta) heading:
No description
foo9ar
foo9arOP8mo ago
Just to clear things up, I manually uploaded the files for my website for my first cloudflare pages project instead of using a GitHub repo so it never asked me for the Build settings. I think I understand how to add the environment variables in the git version but do I have to delete my old project and start anew? Is there anyway to get these Build Settings on my old project or allow cloudflare to use my repository on GitHub? In short, how would I go about changing from manual upload to direct git repository?
foo9ar
foo9arOP8mo ago
I will dunk my head in a bucket, I am beyond stupid, thank you for all your help! I'll flag this post solved, even though I do have a few questions remaining.
No description
foo9ar
foo9arOP8mo ago
Okay nevermind, I decided to create a new cloudflare pages project and this time use a GitHub repo, all is well! Should I create a new thread for this? I followed all the instructions and the website is now live at https://primo-6v2.pages.dev/ but it returns a 404
foo9ar
foo9arOP8mo ago
I don't think all the assets got uploaded from the repo:
No description
foo9ar
foo9arOP8mo ago
here's the build log:
z0rrn
z0rrn8mo ago
Hello, I had the same issue deploying on Cloudflare so I think it's an issue on primo's site.
foo9ar
foo9arOP8mo ago
Oh you're the same person from the primo server Thanks for the info
Want results from more Discord servers?
Add your server