I think I’ll be creating more small Jaspr sites in the future. Many of them will be static-only (basically, using Jaspr as a site generator, similar to Jekyll) but some might have a dynamic component to them.
The obvious choice (even mentioned on Jaspr’s doc site) is to use Firebase Hosting (for static content) + Cloud Run (for dynamic stuff).
A more hands-on approach is to rent a VPS and either manually scp docker files to it, or use something like Coolify to make the deployment a bit more automatic. But this is still putting a lot more ops responsibility on myself which might not be worth it given a bunch of small, mostly non-critical Jaspr sites.
I wonder if people have an experience with something in the middle, perhaps closer to the Firebase (PaaS) model, where Dart can work out of the box (or with minimal setup), ops headaches are minimized, and Time-to-First-Byte is as good or better than Firebase. Bonus points for EU-based companies.
I know Invertase used to run Globe, but that project is being shut down. I’m not necessarily looking for a Dart-only PaaS (in fact, I probably prefer something more general) but I like the idea of Dart being a first-class citizen and deployment being easy, (semi-)automatic, and less error-prone.
Serverpod Cloud. Use Jaspr with Serverpod, and you get a full ORM (plus obviously a great backend for your Flutter app, too). We are in full force getting Serverpod 4 out the door, but a full integration with Jaspr is planned. The setup currently may be slightly fiddly, but it still works.
Thanks! I was briefly looking at Serverpod Cloud today, but frankly I don’t know if my use case is a good fit in terms of financials. I have 10+ small projects on 5+ different domains. Most of them are mostly (or completely) static websites with little traffic. For that, a VPS or a Firebase project is a better fit, maybe. Serverpod Cloud looks more geared towards “I have a commercial project” than “I have a bunch of random side projects” - which is totally valid a almost certainly the correct business approach, tbh.
For static-only use case, where you generate all the files beforehand, you could use Cloudflare Pages.
Currently, I generate the public files, zip them, and upload them manually but you can use setup a cli script to automate the process. Then I use firebase functions (dart-variant) for analytics.
Just out of curiosity is there a particular reason, your looking for alternatives?
I didn’t realize it’s up and running already. Are you seeing any issues or is this mostly working as you’d expect?
There are two. First, honestly, I just like to tinker, and tinkering is the reason I’ve found some of my favorite technologies. If I didn’t tinker, I’d probably still be in the JavaScript or PHP ecosystem.
Second, I dislike how much of my development life is aggregated under only a few companies (Google, Apple, Amazon, JetBrains). I see the advantages of living in walled gardens but I also see the long-term trap. To me, part of the fun (and value) of engineering is to be able to mix and match technologies that weren’t designed to work together.
So far it works as expected. You have to activate it though. You can use: firebase experiments:enable functionsrunapionly or firebase experiments:enable dartfunctions. I used the first command when digging around when the feature was still being developed, the second command is brought up by the firebase documentation.
After you activate the experiment, you can run firebase init. The Dart runtime will be available in functions runtime selection.
Deployment works the same as for node.js, simple firebase deploy works.
The main downsides as of now are:
currently only https functions are supported, so you can set up an API, but you can’t setup triggers. some triggers can be emulated though. There is a user vote for full support.
deployed Dart functions don’t show up in the firebase console, but are visible in the google cloud console instead
Dart function endpoints need to be referenced via httpsCallableFromUrl instead of httpsCallable because the deployment path is different so httpsCallable can’t resolve the name. (For me this isn’t a problem, because my client facing api is a single function with a protobuf request / response)
Also you can already use firestore, storage etc. services in side your functions. And if the provided services don’t work you can easily use the googleapis package to access them through there. Also, you have the necessary auth client available so setting up auth for the googleapis is also super quick.
Hope this helps.
Totally agree. I was just curious if it was a more technical or commercial reason. Because for instance, Cloudflare Pages are advertised as completely free (for unlimited use), while Firebase Hosting is has a cost after a certain point, so perhaps if you’re looking to create asset rich websites, Cloudflare Pages could then be cheeper.
Using contents of this forum for the purposes of training proprietary AI models is forbidden. Only if your AI model is free & open source, go ahead and scrape. Flutter and the related logo are trademarks of Google LLC. We are not endorsed by or affiliated with Google LLC.