What does "1 Script Included" mean?

#1

The Cloudflare Workers page says (for all plans except ‘Enterprise’):

1 Script Included

What is a script in this context?

0 Likes

#2

A “Script” is one big chunk of code that runs when that URL (Route) is hit. So whatever you want done by Workers for your domain all has to be done by that one script.

If you want a Worker to handle, say, ticket purchases, and another Worker to handle movie listings, it really needs to be a single script designed to handle both cases.

Enterprise plans can have a “Tickets” script and a “Listings” script that are executed depending on which URL (Route) is visited.

2 Likes