Deploy and monitor Edge Handlers

This feature is in early access BETA.

# Deploy Edge Handlers

Edge Handler deploys are atomic. This means that modifying assets in the Edge Handlers directory in a separate branch won’t change the behavior of any handlers in production. If you’re using continuous deployment, Edge Handlers updates move to production only when you merge changes into your production branch and publish the new production deploy.

You can also deploy a site with Edge Handlers to production using the Netlify CLI deploy command with the --prod flag.

# Bundle your code

Since Edge Handlers run in isolation from the rest of your project, they must be bundled before deployment. We handle that step for you using the integrated @netlify/plugin-edge-handlers Build Plugin. This plugin uses Rollup to bundle your Edge Handler code and any accompanying dependencies into a single JavaScript file.

To test that your handler and any dependencies bundle properly, you can build and then deploy to a unique draft URL for previewing and testing. Run the Netlify CLI build and deploy commands or a combined command.

netlify deploy --build

# Monitor your Edge Handlers

To access versions of your Edge Handlers in the Netlify UI, select your site from the Sites menu, then go to the Edge Handlers tab.

By default, the list displays the handlers in the current production deploy. To find Edge Handlers on another deploy, use the dropdown at the top of the list. You can start typing to jump to a particular branch.

Selecting an Edge Handler from the list on your site’s Edge Handlers page will open the log for that handler.

# Log contents

Netlify displays a running log for the last hour of activity, including: