npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

worter

v0.0.9

Published

Build Cloudflare Workers without hassle

Readme

😺 Worter

Build production-ready Cloudflare Workers apps.

  • 👌 TypeScript by default.
  • 📦 Simple & lightweight. Only ~7kb in production build.
  • 🤞 A great list of middlewares to help you to build your application faster without reinventing the wheel.
  • 🚀 All features are tested in Production Cloudflare environments.

You can build fast and scalable API server or web apps that runs on Cloudflare Workers with Worter in no time 🔥.

TODO: Build site with link to this markdown, the site should be deployed on cloudflare workers.

Features

  • Advanced routing. Worter offers an advanced and efficient routing mechanism that you can use to handle highly dynamic URLs.
  • Middleware as first-class citizen. Worter application is essentially a series of middleware function calls. With such an architecture, it becomes easy for you to add, remove, or modify various features to and from the application, giving high scalability to the application.
  • ✅(WIP) Template engines support. Worter supports all template engines that allows your Cloudflare Workers apps to have dynamic content by constructing HTML templates on the server side, replacing dynamic content with their proper values, and then sending these to the client side for rendering.
  • ✅(WIP) Easy to test. Worter provides set of tools that you can use to test your application in Production Cloudflare environments. Yes, it's okay to deploy on a Friday at 5pm 😉.

💃 Getting started

Add to existing project:

npm i worter --save-exact

or start new Worter project:

$ wrangler generate my-app https://github.com/pyk/worter-template
$ cd my-app/
$ npm install

Start the development server using the following command:

$ wrangler dev

And you are ready to go! 🚀

Continue read the guide below to learn more about the Worter.

🌎 Hello world example

import { Worter } from "worter";

const app = new Worter();

app.get("/", (request, response) => {
    return response.json({ message: "Hello from Worter 😺!" });
});

addEventListener("fetch", (event) => {
    event.respondWith(app.serve(event.request));
});

Run the app on your local machine with the following command:

$ wrangler dev

The wrangler starts a server and listens on port 8787 for connections. The app responds with the following JSON formatted string:

{
    "message": "Hello from Worter 😺!"
}

for requests to the root URL (/) or route. For every other path, it will respond with a 404 Not Found.

Next, let's talk about the basic routing mechanism in Worter apps.

🎛️ Basic routing

Routing refers to determining how an application responds to a request to a particular endpoint, which is a URI (or path) and a specific HTTP request method (GET, POST, and so on).

Each route can have one handler function, which are executed when the route is matched.

In Worter, route definition takes the following structure:

app.METHOD(PATH, HANDLER)

Where:

  • app is an instance of Worter.
  • METHOD is an HTTP request method, in lowercase. For example app.get, app.post and so on.
  • PATH is a specified path to handle.
  • HANDLER is the function executed when the route is matched.

It is highly-inpired by express.js.

The following examples illustrate defining simple routes.

Respond with Hi! on the homepage:

app.get("/", (request, response) => {
    return response.text("Hi!");
});

Respond to POST request on the root route (/), the application’s home page:

app.post("/", (request, response) => {
    return response.text("POST request accepted");
});

Respond to a PUT request to the /product route:

app.put("/product", (request, response) => {
    return response.text("PUT request accepted");
});

Respond to a DELETE request to the /product route:

app.delete("/product", (request, response) => {
    return response.text("DELETE request accepted");
});

For more details about routing, see the routing guide.