init
This commit is contained in:
@@ -0,0 +1 @@
|
||||
export * from "../runtime.ts";
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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);
|
||||
Reference in New Issue
Block a user