Ingest Ingest Composable Server/less IO Framework
GitHub

Build Sequence

Create a Server

This guide shows the shortest path to a running Ingest app. It establishes the smallest viable application shape before the docs introduce plugins, route composition, or runtime-specific concerns.

Task GuideImplementation Steps

On This Page

Structural Map

  1. HTTP server
  2. WHATWG-style server handler
  3. Read next

This guide shows the shortest path to a running Ingest app. It establishes the smallest viable application shape before the docs introduce plugins, route composition, or runtime-specific concerns.

HTTP server

TypeScript
import { server } from '@stackpress/ingest/http';

const app = server();

app.get('/', ({ res }) => {
  res.setHTML('<h1>Hello World</h1>');
});

app.create().listen(3000);

WHATWG-style server handler

TypeScript
import { server } from '@stackpress/ingest/whatwg';

const app = server();

app.get('/health', ({ res }) => {
  res.setJSON({ ok: true });
});

export default function handle(request: Request) {
  return app.handle(request, undefined);
}