@meowuu/worker-router
v1.0.6
Published
[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/meowuu/worker-router) ![Node.js CI](https://github.com/meowuu/worker-router/workflows/Node.js%20CI/badge.svg?branch=mast
Downloads
3
Readme
worker-router
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