jollytoad / deno_http_fns

A bunch of functions for building HTTP servers
https://jsr.io/@http
MIT License
18 stars 1 forks source link

Support alternative path matching syntax #3

Closed jollytoad closed 1 year ago

jollytoad commented 1 year ago

The walkRoutes (as used by the dynamicRoutes and generate script) currently support URLPattern syntax only, and some of the pattern constructs do not make valid module names, for example: {.:ext}? cannot be added to allow optional extensions.

It would be useful to allow alternative path to URLPattern mappings to allow representation of certain things such as an extension match in an alternative syntax, and also to support Fresh/Next.js compatible path names.

jollytoad commented 1 year ago

Implemented in v0.0.21