Skip to main content
1

Login and navigate to scripting

Login to bunny.net dashboard, then navigate to Edge Platform > Scripting and click Add Script.
2

Select a script type

Provide a name for your script and select a script type:
Select Standalone type and then Default standalone template.
Standalone scripts run independently and handle HTTP requests directly at the edge without an origin server. They’re ideal for REST APIs, UI applications, and data processing.Learn more about standalone scripts
Click Add script.
3

Explore the script editor

An underlying pull zone is automatically set up for your script, making it accessible from the outside through a unique URL. Your new script starts with a placeholder function that issues a simple “Hello from” when accessed through its URL.
The bottom left panel is a preview pane where you can input a URL and execute the script currently open in the editor. Executing the script here doesn’t alter the actual deployed script, allowing you to safely test and refine your code before publishing.
On the bottom right, the dashboard includes a logs pane. This pane captures and displays output from any console.log calls made by the script when it is run in the preview pane.
It serves as a crucial debugging aid, providing real-time insights into the script’s performance and helping you identify any issues or confirm operations through the log outputs.
4

Edit and test your script

Edit your script to customize its functionality. You can replace the placeholder with your desired code. Use the provided URL to test your script and ensure your changes work as expected.
5

Save and publish

When you are happy with your script, click Save and Publish.
Once you save and publish your changes, they are applied immediately, allowing for real-time updates and modifications.