Skip to content
ankhoragePublic

About

Framework-neutral executable API runtime and transport contract for Ankhorage.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

@ankhorage/api

license: MIT npm: v0.3.1 runtime: bun typescript: strict eslint: checked prettier: checked build: checked tests: checked paradox: canonical

Framework-neutral executable API runtime for Ankhorage.

Usage

CLI

Ankhorage packages expose their command-line interface through ankh. Use ankh --help to discover available package commands, or run a package command with --help for package-specific usage.

# Install the Ankhorage CLI
bun add --global @ankhorage/ankh

# Show usage information for api
ankh api --help

Basic Usage

@ankhorage/api executes portable internal REST API definitions without coupling application handlers to Fastify, Next.js, or another HTTP framework. Framework packages adapt requests and responses at the transport edge while this runtime owns operation lookup and dispatch.

const definition = {
  id: "health-api",
  origin: "internal",
  protocol: "rest",
  basePath: "/api",
  endpoints: {
    health: {
      id: "health",
      kind: "http",
      operations: {
        "health.read": {
          id: "health.read",
          protocol: "http",
          intent: "read",
          method: "GET",
          path: "/health",
        },
      },
    },
  },
} satisfies InternalRestApiDefinition;

Generated documentation

About

Framework-neutral executable API runtime and transport contract for Ankhorage.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages