add initial stuff

This commit is contained in:
Adora Laura Kalb 2023-07-11 07:56:48 +02:00
commit 35193885cd
Signed by: adoralaura
GPG key ID: 7A4552166FC8C056
5 changed files with 43 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
# Local Netlify folder
.netlify

9
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,9 @@
{
"deno.enable": true,
"deno.enablePaths": [
"netlify/edge-functions"
],
"deno.unstable": true,
"deno.importMap": ".netlify/edge-functions-import-map.json",
"deno.path": "/home/laura/.config/netlify/deno-cli/deno"
}

3
netlify.toml Normal file
View file

@ -0,0 +1,3 @@
[[edge_functions]]
path = "/"
function = "ip"

View file

@ -0,0 +1,17 @@
import type { Config, Context } from "https://edge.netlify.com";
export default async (request: Request, context: Context) => {
return new Response(context.ip, {
headers: { "content-type": "text/plain" },
});
};
export const config: Config = {
path: "/",
};

12
public/index.html Normal file
View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Page Title</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
</head>
<body>
asd
</body>
</html>