Suggestions for Free Hosting of an Open-Source SPA?

0
2
Asked By CuriousCoder99 On

Hey everyone! I'm searching for some free hosting options for my open-source project, and I'm curious about your suggestions. I don't have any budget for this, and a custom domain isn't necessary.

My setup includes Docusaurus for the documentation and Vite + React for the single-page application (SPA). Currently, my project, Img2Num, is hosted on GitHub Pages. While Docusaurus works flawlessly, I'm facing issues with the SPA where only the homepage loads correctly. For example, the credits page works only if a user navigates from the home page, but it breaks if someone reloads or uses a direct link.

This is the classic GitHub Pages + SPA routing dilemma, and I'd like to avoid a hash router and any complicated 404 rewrites.

Here are my constraints:
- Free tier only
- Open-source-friendly
- Full SPA routing support (history API)
- Bonus points if it works with GitHub CI/CD

I'm particularly interested in your thoughts on platforms like Cloudflare Pages or Netlify, or any others you think are suitable. Also, do you usually host docs and the app together, or is it better to separate them? I've been hearing great things about Cloudflare Pages, but I'd love your insights before making a decision. Thanks!

2 Answers

Answered By FrontendFreak On

Go for Vercel! They have a fantastic free tier, and it's perfect for serving static assets instantly as a CDN. It's been smooth sailing for me on that front.

CuriousCoder99 -

That sounds promising! What specific advantages have you found with Vercel compared to others?

Answered By DevGuru45 On

While I haven’t personally used Cloudflare for frontends, I've heard it’s solid for APIs. I highly recommend checking out Vercel; it’s worked wonders for my projects so far. For documentation, I usually advise keeping it together with the app, especially if you don’t have many pages. But since you're using two different frameworks (Vite + React and Docusaurus), separating them could work well too.

Img2NumDev -

Thanks for the suggestion! Actually, my setup doesn't include a backend, as everything is handled via WebAssembly packaged as a static asset. Your tips are super helpful!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.