top | item 46109399

(no title)

CrimsonCape | 3 months ago

Can someone ELI5 from the experience of hosting a static site, what is the next step beyond a static CDN?

I am guessing the next step is paying for a bucket that that allows virtualized containers to run an OS? Or having a constantly-up node.js backend to generate server-side HTML? Is this essentially the generic description of self-hosting Wordpress on an own server?

Does integrating a payment processor like Shopify require something more than static hosting?

discuss

order

benmanns|3 months ago

For Shopify in particular, they have a headless front-end services called Hydrogen[0] (with optional hosting called Oxygen). It's basically an opinionated wrapper around the storefront[1] and customer account[2] APIs, which allows interacting with the store from the front-end. It allows you to host Shopify on your own domain under your own control and gives a bit more customization than is available via hosted Shopify. It's what I run for the Creature Publishing site[3] and allows some extra customization for wholesale accounts, etc, without the exceptionally expensive enterprise (Shopify Plus) plan. To be completely honest, sometimes I question the decision over a simple hosted shop subdomain. Some light SSR/API calls are necessary for our setup, which is hosted on Cloudflare Pages/Workers.

[0]: https://hydrogen.shopify.dev/

[1]: https://shopify.dev/docs/api/storefront/latest

[2]: https://shopify.dev/docs/api/customer/latest

[3]: https://creaturehorror.com/

0x3f|3 months ago

Next step in which dimension?

There is what modern JS world calls 'SSR' (server-side rendering) which is where, yes, you basically have a node server running to generate the HTML that is sent to the browser and that's then 'hydrated' into a client-side app. Doesn't necessarily have to be Node/JS though, other languages have their own frameworks, but JS is probably most common. This setup can then be fronted by a CDN for caching purposes.

That's not really related to the bucket concept though, it just runs on a normal server and serves everything (static and dynamic content), typically.

IMO the benefits of SSR (vs SSG or a pure static-file site) are marginal _unless_ you have a very specific use case. E.g. an ecommerce site where you want all your product pages to have great SEO, but you've got too many products to build them all at once.

Then again if you _only_ need a website (i.e. no API for other clients) then it can be nice to have end-to-end types in that kind of fullstack setup.

> Does integrating a payment processor like Shopify require something more than static hosting?

I don't know about Shopify but for e.g. Stripe you can do a lot on their hosted pages, without your own backend. If you want to automate things though, have user state based on payments, etc you will need a backend and a data store of some kind. But that could be an API that your static site points to.