- To deploy it run
vercel
orvc
, or link the project to GitHub and rungit push
. - Do note
index.html
needs to be inside a folder calledpublic/
- Docs:
Created
December 1, 2022 07:18
-
-
Save rauchg/fd21fd5be8feb17e9ece0ba3eeca761f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<h1><marquee direction="right">Hello nomsternom</marquee></h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { next } from "@vercel/edge"; | |
export default (req) => { | |
const url = new URL(req.url); | |
if (url.pathname === "/api") { | |
return Response.json({ hello: "world", date: Date.now() }); | |
} else { | |
return next(); | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dependencies": { | |
"@vercel/edge": "^0.1.2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment