Enable JSX Templating in ElysiaJS

This commit is contained in:
2024-01-30 16:21:27 -08:00
parent 6f0c4620d7
commit cc8fe27935
6 changed files with 27 additions and 26 deletions

View File

@@ -1,14 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script defer src="./htmx.min.js"></script>
<title>Caleb's Blog</title>
</head>
<body>
<h1>Hello</h1>
<button hx-get="/content/post">Click Me</button>
</body>
</html>

17
src/frontend/index.tsx Normal file
View File

@@ -0,0 +1,17 @@
export function Index() {
return (
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script defer src="./htmx.min.js"></script>
<title>Caleb's Blog</title>
</head>
<body>
<h1>Hello</h1>
<button hx-get="/content/post">Click Me</button>
</body>
</html>
)
}