@karmaniverous/smoz
    Preparing search index...

    @karmaniverous/smoz

    SMOZ

    Serverless · Middy · OpenAPI 3.1 · Zod

    npm version Node Current docs changelog license

    SMOZ is a small, pragmatic toolkit for authoring AWS Lambda handlers with [Middy] and [Zod], then aggregating Serverless functions and hand‑crafted OpenAPI 3.1 paths from a single, schema‑first application definition.

    • Keep prod code testable and framework‑agnostic
    • HTTP middleware with validation, shaping, errors, CORS, negotiation, and HEAD
    • Non‑HTTP flows stay lean (no middleware overhead)

    From an empty directory:

    npx @karmaniverous/smoz init -i
    npx smoz dev -p 3000
    • The first command scaffolds a new app and installs dependencies (including a local smoz bin).
    • The second command starts the inline local backend and keeps registers + OpenAPI fresh.
    • Open http://localhost:3000/openapi in your browser.

    Prefer serverless‑offline?

    npx smoz dev -l offline -p 3000
    

    Add your first endpoint (avoid clashing with the template’s hello):

    npx smoz add rest/foo/get
    
    npm i @karmaniverous/smoz zod zod-openapi
    
    npm i -D typescript typescript-eslint eslint prettier typedoc