The Edge is the Future! What are Edge Functions? Exploring Netlify Edge Functions
By codeSTACKr
Published: May 02, 2022“
Become A VS Code SuperHero Today: https://vsCodeHero.com
Join my Discord developer community: https://discord.gg/A9CnsVzzkZIn this video, you’ll learn what the Edge is and how edge functions can help you get content to your users faster!
So, what is the Edge? Generally, when you go to a website, that site might be hosted on the other side of the world. Depending on where you are, it may take longer to load.
The edge is a network of servers around the world that automatically detects where your user is located and serves content to them from the closest server.
The CEO of Netlify, Matt Biilmann, says that they are building an open-source runtime for the edge, poised to be an industry standard that is not proprietary to Netlify.
The Netlify edge functions allow you to run serverless JavaScript or TypeScript functions directly on their edge network. The key to this is Deno. Deno is a secure by default runtime that enables out-of-the-box compatibly with many web frameworks.
Netlify’s Edge Functions don’t require a framework, but they do work with Astro, Eleventy, Hydrogen, Next.js, Nuxt, Remix, SvelteKit, and many others.
You can even stream and render an entire site from the edge!
The bottom line is, you get content to your users faster!Resources
- Netlify Edge Functions Examples: https://edge-functions-examples.netli…
- Sign up for a Free MongoDB Atlas Database: https://www.mongodb.com/cloud/atlas/r…
- MongoDB Atlas Data API: https://www.mongodb.com/docs/atlas/ap…
Tools I use:
- codeSTACKr Theme: https://marketplace.visualstudio.com/…
- STACKr Code Font (Exclusive to my VS Code Course – https://vsCodeHero.com)
- SuperHero Extension Pack: https://marketplace.visualstudio.com/…
Timestamps
- 00:00 – Intro
- 00:11 – What is the Edge?
- 01:32 – What is possible with Edge Functions?
- 01:46 – Bare Bones Example
- 03:12 – Next.js Example
- 03:58 – Geolocation
- 04:51 – Content Localization
- 06:17 – Create and modify cookies
- 06:52 – A/B Testing
- 08:26 – Fetching data from the edge
[READ MORE]”