Distribute silverbullet as a library

Hey! I’m the creator of smallweb, a self-hosted serverless platform powered by deno. More details here: here: https://smallweb-readme.pomdtr.me/

In smallweb, you can install a new app by creating a single main.ts, exporting a fetch handler. Ex:

// ~/www/example/main.ts
const handler = (_req: Request) => {
     return new Response("Hello world")

export default {
   fetch: handler

Then you just go to https://example.localhost or https://example.<your-domain> to preview the results.

I would be interested in hosting silverbullet from smallweb. It would require two things:

  • publishing silverbullet as package to jsr
  • exporting a handler in the package.

It would probably look something like this:

import { SilverBullet } from "jsr:@silverbullet/silverbullet"

const silverbullet = new SilverBullet(/* config */);

export default silverbullet;

Would you be interested in providing this deployment option ?

In principle I’m open to any new way to make it easier for people to run and deploy SilverBullet. However, I’ve also been hit by the complexity that is added by continuously having to test and maintain each of those options. There were desktop app and mobile app distributions before that worked, but started to take excessive amounts of overhead to test and keep running. Since this is a small project I decided to simplify and ditch them.

I see a similar risk here. If what you’re proposing can be done in a way that doesn’t put additional testing and maintenance and support pressure on SB: sure. If not, I prefer to keep things simple.