SERVER ROUTER

Endpoint groups are one level

Each group adds a path prefix and optional middleware to direct methods and WebSockets before Dowe compiles the final routes into the Rust server. Groups never contain groups.

dowe
endpoints apiRoutes
  group path:"/api/blogs"
    get path:"" handler:listBlogs
    get path:"/:id" handler:readBlog
    post path:"/create" handler:createBlog middleware:[requireBearer]
    patch path:"/:id/edit" handler:updateBlog middleware:[requireBearer]

Path composition

The group /api/blogs plus get path:"/:id" registers GET /api/blogs/:id. An empty method path targets the group root.

Ordered protection

Group middleware runs first. Method middleware runs after it and before its handler. Put protection on either surface without nesting groups.

One normalized router

The compiler resolves groups once; the shared Rust runtime receives final HTTP routes and does not reparse source.