diff --git a/README.md b/README.md index 54e923db8..df739f685 100644 --- a/README.md +++ b/README.md @@ -328,7 +328,7 @@ No additional configuration is needed to deploy the application to Vercel. If yo Since Vercel Edge runtime uses Cloudflare, the steps are similar to deploying to Cloudflare. -## Deploying to Cloudflare +## Deploying to Cloudflare 🔥 To deploy the application to Cloudflare, you need to do the following: @@ -338,6 +338,18 @@ To deploy the application to Cloudflare, you need to do the following: 4. Switching CMS 5. Setting Node.js Compatibility Flags +### 0. Limitations + +Before you continue, **please evaluate the limitations of the Edge runtime**. The Edge runtime does not support all Node.js features, so you may need to adjust your application accordingly. + +Cloudflare is cheaper and faster than many other providers, but running your application on Cloudflare Workers means not having access to the vast Node.js ecosystem. + +Makerkit uses Cloudflare as baseline, so you can deploy it to Cloudflare Workers without any issues. However, you will need to keep in mind the limitations of the Edge runtime when adding new features. + +One more thing to consider is that the Edge runtime does run close to your users, but may run far from your database. Consider read replicas or other strategies to reduce latency in all situations. + +If your mind is set on using Cloudflare, please follow the instructions below. + ### 1. Opting in to the Edge runtime To opt-in to the Edge runtime, you need to do the following: open the root layout file of your app `apps/web/app/layout.tsx` and export the const runtime as `edge`: