JSPM

  • Created
  • Published
  • Downloads 2266
  • Score
    100M100P100Q117976F
  • License Apache-2.0

Standard Hono Server Adapter for ObjectStack Runtime

Package Exports

  • @objectstack/plugin-hono-server
  • @objectstack/plugin-hono-server/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@objectstack/plugin-hono-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@objectstack/plugin-hono-server

HTTP Server adapter for ObjectStack using Hono.

Features

  • Standard Runtime: Uses the unified HttpDispatcher and standard Hono adapter via @objectstack/hono.
  • Fast: Built on Hono, a high-performance web framework.
  • Full Protocol Support: Automatically provides all ObjectStack Runtime endpoints (Auth, Data, Metadata, etc.).
  • Middleware: Supports standard Hono middleware.

Usage

import { ObjectKernel } from '@objectstack/runtime';
import { HonoServerPlugin } from '@objectstack/plugin-hono-server';

const kernel = new ObjectKernel();

// Register the server plugin
kernel.use(new HonoServerPlugin({ 
  port: 3000,
  restConfig: {
      api: {
          apiPath: '/api/v1' // Customize API prefix
      }
  }
}));

await kernel.start();

Architecture

This plugin wraps @objectstack/hono to provide a turnkey HTTP server solution for the Runtime. It binds the standard HttpDispatcher to a Hono application and starts listening on the configured port.