This commit is contained in:
Luca Casonato
2021-05-08 02:07:24 +02:00
parent f05c2e3a68
commit 6ecdf2ed73
17 changed files with 284 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
export * from "../runtime.ts";
+16
View File
@@ -0,0 +1,16 @@
import { h, PageProps, useState } from "../deps.ts";
export default function Home(props: PageProps) {
const [counter, setCounter] = useState(0);
return (
<div>
Hello {props.params.name}! {counter}{" "}
<button onClick={() => setCounter(counter + 1)}>+1</button>
</div>
);
}
export function self() {
return import.meta.url;
}
+9
View File
@@ -0,0 +1,9 @@
import { h } from "../deps.ts";
export default function Home(props: {}) {
return <div>Hello World!</div>;
}
export function self() {
return import.meta.url;
}
+6
View File
@@ -0,0 +1,6 @@
import { setup } from "../server.ts";
import * as $0 from "./pages/[name].tsx";
import * as $1 from "./pages/index.tsx";
setup([$0, $1], import.meta.url);