Just Being Curious, Can I build a eCommerce website using "workers" to host all the js?

What I mean is, the website is based on js and almost all of them are on Cloudflare workers which i can make the whole site “serverless”?

you can do anything you set your mind to, man

Yes, because you can do server side rendering on Cloudflare Edge. Use Workers KV to store inventory and assets. And handle payments through and external API like Stripe.

You can. Whether it is a good idea is a different story :slight_smile:. You can also build a website on x86 assembler.

But will it cost a lot? Since all the scripts are on Cloudflare, they all bounce between workers and it just feels like the quota will run out in a sec.

Well, you will have a worker invocation for each request, so that certainly will be pricey to a certain extent. Again -> good idea :slight_smile:

Also, I wouldnt want to be the one who has to debug that :wink:

You should do maths, with your conversion metrics, 0.50 cents buys you 1 million requests. How many requests would you need to make a sale?

that’s a hard math, as :
short js length = speed
long js length = cheap
high speed = more attractive to surf
more surf = more sale
more surf = more cost…

It’s really hard to count

you can serve the static files directly from the cache bypassing the worker, can be cheaper than managing servers yourself