Getting Started
Install the packages with your preferred package manager, align engine versions with the monorepo, and boot a minimal HTTP listener with orveth or @orveth/server.
Requirements
| Requirement | Details |
|---|---|
| Node.js | >=20.10.0 (see root package.json engines). |
| TypeScript | Version 5.x with strict mode enabled is the expected consumer posture. |
| pnpm | pnpm@9.15.4 is pinned via packageManager for reproducible workspace installs. |
Installation
Published artifacts use the @orveth/* scope. Add only the packages your service needs, or install the unscoped orveth meta-package to depend on every published module at once (larger install graph).
pnpm
pnpm add @orveth/servernpm
npm install @orveth/serverMeta-package (all modules)
pnpm add orveth
# or: npm install orvethImport from orveth the same symbols you would from @orveth/server, @orveth/http, and the other scoped entrypoints.
Yarn (Berry or Classic)
yarn add @orveth/serverMinimal HTTP service
Route handlers receive a RequestContext. Return ctx.ok() or ctx.json() for concise handlers, or await when you prefer explicit async flow. listen resolves with Node's http.Server once the socket is bound.
import { Orveth } from "orveth";
const app = new Orveth();
app.get("/health", (ctx) => ctx.ok({ status: "ok" }));
const server = await app.listen(Number(process.env.PORT ?? 3000));
// Options form: await app.listen({ port: 3000, hostname: "127.0.0.1" });
void server;Working inside the monorepo
- Run
pnpm installat the repository root. - Build libraries with
pnpm buildbefore packaging or linking downstream consumers. - Run
pnpm testandpnpm lintprior to submitting changes.
Next steps
- Server reference — routing, middleware, and context API.
- Examples — TLS, JWT, Prisma, and config patterns.
- Deployment — production process and hosting notes.
Editor and tooling tips
- Enable TypeScript project references or solution-style navigation for faster cross-package jumps.
- Use the published
exportsmap for auto-imports; avoid deep relative paths intopackages/*/src. - Consult package-level README files for focused notes not duplicated in this documentation site.