Skip to content

Commit

Permalink
Add test edge function
Browse files Browse the repository at this point in the history
  • Loading branch information
igneosaur committed Jul 27, 2023
1 parent f4cd82e commit 1600849
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ public
src/gatsby-types.d.ts
.env.*
!.env.example
.netlify
9 changes: 9 additions & 0 deletions netlify/edge-functions/hello.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Context } from "https://edge.netlify.com";

export default async (request: Request, context: Context) => {
const next = await context.next();
console.log("Hello from the edge.", { next });
return next;
};

export const config = { path: "/" };

0 comments on commit 1600849

Please sign in to comment.