29 lines
624 B
TypeScript
29 lines
624 B
TypeScript
import { routes } from "@utils"
|
|
|
|
export default routes({
|
|
"GET /": index,
|
|
"GET /pets": pets
|
|
})
|
|
|
|
function index() {
|
|
return <>
|
|
<h1>Hi world!</h1>
|
|
<p>Welcome to my personal web page.</p>
|
|
<p>If you are looking for information on pets, click here:</p>
|
|
<p><a href="/pets">PETS</a></p>
|
|
</>
|
|
}
|
|
|
|
function pets(c: Context) {
|
|
return c.html(<>
|
|
<ul>
|
|
<li>dogs</li>
|
|
<li>cats</li>
|
|
<li>iguanas</li>
|
|
<li>hamsters</li>
|
|
<li>snakes</li>
|
|
<li>chickens</li>
|
|
<li>...even goats!</li>
|
|
</ul>
|
|
</>)
|
|
} |