Smallweb Demo

Learn more about smallweb at smallweb.run.

I've tried to protect this demo from the most common attacks, but please don't explicitly try to break it (that's just rude). If you find a bug or vulnerability, please report it to me on bluesky, discord or as github issue.

Creating your own website

  1. Open the editor at vscode.demo.smallweb.live.

  2. Create a new folder in the root directory (ex: /mywebsite/).

  3. Create the /mywebsite/main.tsx file in the new folder with the following content:

    /** @jsxImportSource https://esm.sh/preact */
    import { render } from "npm:preact-render-to-string";
    
    export default {
        fetch: () => new Response(render(<div>Hello from smallweb! </div>), {
            headers: {
                "Content-Type": "text/html",
            },
        })
    }
  4. Go the https://mywebsite.demo.smallweb.live to preview your website.

Example

You can list all existing websites by going to ls.demo.smallweb.live.