add initial stuff
This commit is contained in:
commit
35193885cd
5 changed files with 43 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# Local Netlify folder
|
||||||
|
.netlify
|
9
.vscode/settings.json
vendored
Normal file
9
.vscode/settings.json
vendored
Normal 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
3
netlify.toml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[[edge_functions]]
|
||||||
|
path = "/"
|
||||||
|
function = "ip"
|
17
netlify/edge-functions/ip.ts
Normal file
17
netlify/edge-functions/ip.ts
Normal 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
12
public/index.html
Normal 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>
|
Loading…
Reference in a new issue