Skip to content

Instantly share code, notes, and snippets.

@Thesephi
Last active February 27, 2025 03:28
Show Gist options
  • Save Thesephi/91fd16a154b584f3b45872d2accc93eb to your computer and use it in GitHub Desktop.
Save Thesephi/91fd16a154b584f3b45872d2accc93eb to your computer and use it in GitHub Desktop.
fullsoak on smallweb
{
"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"
}
}
export const MyApp = () => <div>Hello, smallweb</div>
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