搜尋套件、儲存庫與 APP 分類

套件詳情v1.1.5

shelf_router

一個方便的 shelf web 框架請求路由器,支援 URL 參數、巢狀路由器以及透過原始碼註解產生的路由器。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
61.5萬
喜歡數
324
Pub 分數
160

安裝套件

flutter pub add shelf_router

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

Shelf Router 是一個輕量級、富有表現力的路由庫,專為 Shelf Web 框架設計,讓開發者能透過支援 URL 參數、嵌套路由器以及透過原始碼註解實作編譯時期路由產生的方式來定義 HTTP 路由。它透過乾淨的語法與更佳的組織結構,簡化請求處理。非常適合在跨多平台的 Dart 應用中建構可擴展的後端服務。

適用情境

  • 建構 RESTful API
  • 處理動態 URL 路由
  • 建立模組化後端服務
  • 從註釋生成路由
  • 與基於書架的伺服器整合

主要特色

  • URL 參數支援
  • 嵌套路由器組合
  • 基於源註釋的路由生成
  • 乾淨、可讀的路由定義
  • 與 Shelf 的無縫整合

適合對象

  • Dart 後端開發人員
  • API服務建構器
  • 跨平台伺服器應用
  • 貨架框架使用者
  • 需要結構化路由的項目

使用建議

  • 需要 Shelf 框架
  • 僅限 Dart 伺服器環境
  • 註解處理需要建構步驟
  • 不適用於客戶端路由
  • 依賴於 build_runner 進行程式碼生成

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Build Status

About Shelf

Shelf makes it easy to create and compose web servers and parts of web servers. How?

  • Expose a small set of simple types.
  • Map server logic into a simple function: a single argument for the request, the response is the return value.
  • Trivially mix and match synchronous and asynchronous processing.
  • Flexibility to return a simple string or a byte stream with the same model.

It was inspired by Connect for NodeJS and Rack for Ruby.

See the package:shelf readme for more information.

Packages

Package Description Issues Version
shelf A model for web server middleware that encourages composition and easy reuse. issues pub package
shelf_packages_handler A shelf handler for serving a packages/ directory. issues pub package
shelf_proxy A shelf handler for proxying HTTP requests to another server. issues pub package
shelf_router A convenient request router for the shelf web-framework, with support for URL-parameters, nested routers and routers generated from source annotations. issues pub package
shelf_router_generator A package:build-compatible builder for generating request routers for the shelf web-framework based on source annotations. issues pub package
shelf_static Static file server support for the shelf package and ecosystem. issues pub package
shelf_test_handler A Shelf handler that makes it easy to test HTTP interactions. issues pub package
shelf_web_socket A shelf handler that wires up a listener for every connection. issues pub package
_shelf_compliance HTTP/1.1 compliance and hardening tests. issues (not published)

Publishing automation

For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

所屬分類

依賴

依賴清單 3 項

原始碼儲存庫

使用此套件的專案

所在榜單