@vyriy/server

Local Node.js server adapter for Vyriy handlers.

Purpose

Use this package when a Vyriy project needs a small focused module for server behavior.

Vyriy packages are intentionally small. The goal is to keep the public API explicit, easy to test, and easy to compose with the rest of the Vyriy ecosystem.

Install

With npm:

npm install @vyriy/server

With Yarn:

yarn add @vyriy/server

Usage

import { server } from '@vyriy/server';
import { handler } from './handler.js';

server(handler, { port: 3000 });

Public API

The package is expected to expose the following main surface:

  • server
  • streamServer
  • listen
  • createServer

Parameters and options

  • handler — Vyriy/AWS-style handler to expose over HTTP locally.
  • port — TCP port. Usually read from PORT.
  • host — Host interface. Defaults to local development host.
  • stream — Enables streaming response mode when using streamServer.

Examples

Minimal usage

import * as module from '@vyriy/server';

console.info(module);

Use inside a Vyriy package

// packages/example/index.ts
export { default as example } from '@vyriy/server';

Keep the boundary explicit

// Prefer importing from the package root unless a documented subpath is required.
import {} from /* named export */ '@vyriy/server';

Notes

  • Keep configuration close to the package that owns it.
  • Prefer explicit options over hidden global state.
  • Keep examples small enough to copy into tests or Storybook docs.
  • When adding a new public export, document it in this README and add a focused test.

Related packages

  • @vyriy/config for environment-driven options.
  • @vyriy/script for readable operational flows.
  • @vyriy/handler and @vyriy/server when the package participates in runtime handling.