Skip to content
This repository has been archived by the owner on Feb 23, 2025. It is now read-only.

Commit

Permalink
chore: create netlify edge example
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Apr 29, 2022
1 parent 7b08e08 commit 3aff5ef
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions netlify-edge/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.netlify
16 changes: 16 additions & 0 deletions netlify-edge/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
experiment with netlify edge (https://github.com/hi-ogawa/ytsub-v3/issues/54)

```sh
# create new site
netlify sites:create --name ytsub-v3-edge-hiro18181
netlify link --name ytsub-v3-edge-hiro18181

# run server
netlify dev

# build
netlify build

# deploy
netlify deploy --prod
```
9 changes: 9 additions & 0 deletions netlify-edge/netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[build]
publish = "public"

[build.processing]
skip_processing = true

[[edge_functions]]
path = "/hello"
function = "hello"
3 changes: 3 additions & 0 deletions netlify-edge/netlify/edge-functions/hello.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function () {
return new Response("Hello");
}
1 change: 1 addition & 0 deletions netlify-edge/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
2 changes: 2 additions & 0 deletions netlify-edge/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<div>index.html</div>
<a href="/hello">/hello</a>

0 comments on commit 3aff5ef

Please sign in to comment.