-
Print
-
DarkLight
-
PDF
Cloudflare Integration for ESM Syntax
This integration is for the ESM javascript syntax in CloudFlare workers.
Step by Step
-
Open your CloudFlare Dashboard here https://dash.cloudflare.com
-
Navigate to the Workers menu:
-
Click to Create Service
-
Select the HTTP Route Handler option, and name the service to your likings.
-
Run the Quick edit -or
-
And paste the following the code from here https://gist.github.com/hisorange/4a073369d28daf9488cc1dccd3014552
7. Click Save and Deploy
8. Now click the Back link and then open the Settings tab, then select the Variables vertical tab, and click the Add variable button.
-
Open your Prerender Dashboard then copy & paste the Token from your header as PRERENDER_TOKEN environement variable, this way you can change your render token without new deployment. Then click Save
-
Navigate to the Triggers tab and setup your routes by the example. The route should be your domain, not Prerender.io.