Skip to main content
The Deno 2 Release Candidate is here
Learn more

WebGen 2.0

A SwiftUI-like Webframework

Getting Started

// Create a mod.ts file
import { PlainText, View, WebGen } from "https://deno.land/x/webgen/mod.ts";

WebGen();
View(() => PlainText("Hello World!")).appendOn(document.body);
// Create a serve.ts file
import { serve } from "https://deno.land/x/esbuild_serve/mod.ts";

serve({
    pages: {
        "index": "./mod.ts",
    },
});
<!-- Create a templates/index.html file  -->
<link rel="stylesheet" href="index.css">
<script src="index.js"></script>
deno run -A --no-check serve.ts

Done! Have fun! More docs will follow