Add edge functions to your project from the Netlify CLI

Getting started with Edge Functions is easier than ever! Now you can use the Netlify CLI to create an edge function within your project from a template. These templates can be used to explore potential use cases for edge functions or be used as a jumping-off point for writing your own edge functions.

Install the latest version of Netlify CLI by running npm install netlify-cli -g, then run netlify functions:create. Follow the prompts to choose a JavaScript or TypeScript template, which will then be created in your netlify/edge-functions directory. Specify a path for your edge function to be invoked on, then visit that path to see your new Edge Function in action!

Learn more about the Netlify CLI by visiting the CLI docs, or learn more about Edge Functions here.

Questions? Comments? Let us know what you think.