yusukebe / pico

Ultra-tiny router for Cloudflare Workers and Deno
https://www.npmjs.com/package/@picojs/pico
MIT License
166 stars 5 forks source link

Cloudflare worker app's export #12

Open ruanyf opened 5 months ago

ruanyf commented 5 months ago

Cloudflare worker app's export should be written as follow.

export default {
  fetch: router.fetch
}

Otherwise, wrangler deploy will throw error.

The uploaded script has no registered event handlers. [code: 10068]

yusukebe commented 3 months ago

Hi @ruanyf

That code should work correctly. Maybe it's not a bug.