搜索插件、代码仓与 APP 分类

插件详情v3.0.2

shelf_packages_handler

用于提供 `packages/` 目录的 shelf 处理程序。

AndroidiOSmacOSWindowsLinux
近 30 天下载
1210万
喜欢数
6
Pub 分数
135

安装插件

flutter pub add shelf_packages_handler

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个货架处理器,可从 `packages/` 目录提供文件,在 Web 服务器环境中启用对 Dart 包中资产和资源的访问。它与 Shelf 框架无缝集成,简化了在开发或部署过程中交付包内容的过程。这在本地开发环境中为依赖项中的静态资产提供服务时特别有用。

适合场景

  • 在开发期间提供包资源
  • 启用对依赖项资源的本地访问
  • 支持使用包内容的自定义Web服务器设置
  • 与基于 Dart 的 Web 服务器集成

主要特点

  • 从 `packages/` 目录提供文件
  • 专为与 Shelf 框架配合使用而设计
  • 与 Dart Web 服务器的简单集成
  • 支持动态资源解析

适合对象

  • 使用 Shelf 构建 Web 服务器的 Dart 开发人员
  • 需要访问包级别资源的工具
  • 需要包文件服务的开发环境

使用建议

  • 不适用于生产部署
  • 需要在 Shelf 管道中进行正确设置
  • 仅限从包中提供静态文件

原始 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 项

源码仓库

使用此插件的项目