Last active
February 27, 2025 03:28
-
-
Save Thesephi/91fd16a154b584f3b45872d2accc93eb to your computer and use it in GitHub Desktop.
fullsoak on smallweb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"imports": { | |
"fullsoak": "jsr:@fullsoak/fullsoak@0.14.0", | |
"preact": "npm:preact@10.26.2" | |
}, | |
"compilerOptions": { | |
"jsx": "precompile", // see https://docs.deno.com/runtime/reference/jsx/#jsx-precompile-transform | |
"jsxImportSource": "preact", | |
"jsxPrecompileSkipElements": ["a", "link"] | |
}, | |
"nodeModulesDir": "auto", | |
"tasks": { | |
"dev": "deno -A src/main.ts" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const MyApp = () => <div>Hello, smallweb</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Controller, Get, ssr, useFetchMode } from "fullsoak"; | |
import { MyApp } from "./components/MyApp/index.tsx"; | |
@Controller() | |
class MyController { | |
@Get("/") | |
serve() { | |
return ssr(MyApp); | |
} | |
} | |
const fetch = useFetchMode({ | |
controllers: [MyController], | |
}); | |
export default { fetch }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment