sheodox / alexandrite

A beautiful and convenient desktop-first alternate web UI for Lemmy.
https://alexandrite.app
GNU Affero General Public License v3.0
226 stars 19 forks source link

Suggestion: Use adapter-static instead of adapter-auto for serverless deployment #67

Open usr3 opened 1 year ago

usr3 commented 1 year ago

Since the app doesn't use SSR, using adapter-auto is unnecessary and has a cost to it. For example, deploying to Cloudflare pages with adapter-auto will incur worker invocations per request.

sheodox commented 1 year ago

I've been going back and forth on this. On the one hand you're right, it does use up worker invocations, but on alexandrite.app I basically never get any more than 5-10% of the daily limit for the free tier for Cloudflare Pages, so I've yet to get anywhere near to the point where I'd have to spend any money on hosting.

Additionally I've been considering adding some SSR (with an option to disable it for self hosters) so links to posts can include social meta tags, that way links sent on chat apps can generate a preview, but I haven't made a final decision about it.