Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 967 Bytes

README.md

File metadata and controls

33 lines (23 loc) · 967 Bytes

worker-router

Gitpod Ready-to-Code Node.js CI codecov npm version

worker-router is a light router util, recommend use in Cloudflare Worker

Install

npm install @meowuu/worker-router
# or use yarn
yarn add @meowuu/worker-router

Usage

import Router from '@meowuu/worker-router'

const router = new Router()

router.get('/home', () => {

})

const resp = await router.route(request)

Todos

  • middleware order
  • redirect