0.0.3 β’ Published 6 months ago
narabi v0.0.3
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
License
MIT License - see LICENSE file