@neoaren/comet

A powerful DX-first routing library for Cloudflare Workers.


Keywords
cloudflare-workers, cloudflare, workers, routing, comet, router, dx
License
MIT
Install
npm install @neoaren/comet@3.1.0

Documentation

logo

☄️ A powerful DX-first routing library for Cloudflare Workers.

NPM Version NPM Install Size NPM Downloads


Getting started

import { GET, server } from '@neoaren/comet'

const comet = server()

comet.route({ pathname: '/api/test/:id', method: GET }, async ({ event }) => {
  // Business logic
  return event.reply.ok({ id: event.params.id })
})

export default <ExportedHandler>{
  fetch: comet.handler
}

Documentation

A proper documentation for Comet is work in progress.

Contribution guide

Use commit names with the following prefixes to indicate their purpose

Emoji Prefix Description
⚡ ⚡ :zap: :zap: for implementing breaking functionality (semver major)
:zap: for implementing non-breaking functionality (semver minor)
🔨 :hammer: for bug fixes and non-breaking improvements (semver patch)
🔧 :wrench: for configurations
🚦 :vertical_traffic_light: for tests
📝 :memo: for documentations
🔍 :mag: for lint fixes
♻️ :recycle: for non-breaking refactoring
📎 :paperclip: for dependencies
:octocat: :octocat: for workflows
🚧 :construction: for experimental or temporary changes