@whi/cf-do-base - v0.1.2
    Preparing search index...

      @whi/cf-do-base - v0.1.2

      Base class for Cloudflare Durable Objects with built-in routing support.

      This package provides a convenient base class that extends Cloudflare's DurableObject with automatic routing capabilities using @whi/cf-routing.

      import { BaseDurableObject } from '@whi/cf-do-base';
      import { DurableObjectRouteHandler } from '@whi/cf-routing';

      class CounterHandler extends DurableObjectRouteHandler {
      async get() {
      const count = await this.ctx.storage.get('count') || 0;
      return { count };
      }
      }

      export class Counter extends BaseDurableObject {
      constructor(ctx, env) {
      super(ctx, env, 'counter');
      this.router.defineRouteHandler('/count', CounterHandler);
      }
      }

      Classes - Classes

      BaseDurableObject

      Interfaces

      Env