0.0.3 β€’ Published 6 months ago

narabi v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Narabi (並び)

Elegant queue handling for Cloudflare Workers.

Installation

npm install narabi

Usage

import { createNarabiApp } from "narabi";

interface MyEnv {
  ENV_TYPE: string;
  MY_SECRET: string;
}

// Create a queue handler with your environment type
const app = createNarabiApp<MyEnv>();

// Register handlers for different queues
queue.on<{ userId: string }>("process-user", async (c) => {
  const { body } = c.message;
  const { MY_SECRET } = c.env;
  // Handle message
});

// Export your worker
export default {
  queue: app.queue,
};

Features

  • 🎯 Type-safe queue handling
  • 🌊 Simple, elegant API inspired by Hono
  • πŸ”’ Environment and binding management
  • πŸ“¦ Zero dependencies

Documentation

Full documentation

License

MIT License - see LICENSE file