New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

workery

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

workery

Modern web framework for building APIs on Cloudflare Workers.

latest
Source
npmnpm
Version
1.2.1
Version published
Maintainers
1
Created
Source

Workery

Documentation: https://workery.iann838.com/

Workery is a Modern, OpenAPI based, fast to code, fully typed, ready for production, web framework for building APIs on Cloudflare Workers.

Features

  • ⚡️ Fast to code and fewer bugs. Increase the speed to develop features and reduce developer induced errors.
  • ⚙️ OpenAPI and Zod integrated seamlessly. Built-in integration of Zod validators and OpenAPI schema generators.
  • 🏷️ Fully typed schemas and parameters. All parameters and schemas are typed when implementing route handlers.
  • 📖 Interactive API documentation. Swagger and Redoc pages are available by default at /docs and /redoc.
  • 🪝 Dependencies over complicated middleware. Prepare variables, enforce authentication, and run other tasks before processing a request.
  • 🔩 Highly flexible and adaptable. Designed for effortless addition, removal, and replacement of modules or components.

Setup

npm create workery

Select a base template, and start developing, some templates may require extra setup. Available templates:

-   hello-world
-   d1-drizzle
-   do-sql-drizzle

Example

import { App } from "workery"
import { Path, Query } from "workery/parameters"
import z from "zod"

const app = new App<Env>({})

app.get("/items/{itemId}", {
    parameters: {
        itemId: Path(z.number().int().min(0)),
        q: Query(z.string().optional()),
    },
    handle: ({ itemId, q }) => {
        return { itemId, q }
    },
})

export default app

Swagger Docs

Join other developers in starring ⭐ this repository to show your support!

Keywords

workery

FAQs

Package last updated on 16 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts