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

插件详情v5.1.0

stream

轻量级 Dart Web 服务器,支持请求路由、过滤、模板引擎、MVC 设计模式和基于文件的静态资源。

AndroidiOSmacOSWindowsLinux
近 30 天下载
3020
喜欢数
8
Pub 分数
120

安装插件

flutter pub add stream

插件介绍

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

Stream 是一个轻量级的 Dart Web 服务器,支持请求路由、过滤、内置模板引擎、MVC 设计模式以及基于文件的静态资源处理。它设计简洁且性能出色,可在 Android、iOS、macOS、Windows 和 Linux 等多个平台上运行。对于希望为 Dart 基础的 Web 项目寻找极简但功能强大的后端解决方案的开发者而言,Stream 能够简化服务器端逻辑,同时保持高度的可定制性和集成灵活性。

适合场景

  • 构建轻量级 Web API
  • 使用模板创建动态网页应用
  • 在Dart中实现MVC架构
  • 从磁盘提供静态文件
  • 开发跨平台 Web 服务器

主要特点

  • 请求路由和过滤
  • 内置模板引擎
  • MVC 设计模式支持
  • 基于文件的静态资源
  • 跨平台兼容性

适合对象

  • Dart 开发人员
  • 后端Web应用开发
  • 原型设计 Web 服务
  • 全栈 Dart 项目
  • 轻量级服务器解决方案

使用建议

  • 仅限 Dart 生态系统
  • 需要手动设置以启用复杂功能
  • 与较大的框架相比,社区规模较小
  • 对于高流量生产系统而言,若不进行额外扩展,则不是理想选择
  • 高级用例的文档可能比较稀疏

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Stream

Stream is a Dart web server supporting request routing, filtering, template engine, WebSocket, MVC design pattern and file-based static resources.

Installation

Add this to your pubspec.yaml (or create it):

dependencies:
  stream:

Usage

  • Introduction
  • Getting Started with Hello World
Compile RSP (Rikulo Stream Page) to dart files

There are two ways to compile RSP files into dart files: automatic building with Dart Editor or manual compiling.

RSP is a template technology allowing developers to create dynamically generated web pages based on HTML, XML or other document types (such as this and this).

Build with Dart Editor

To compile your RSP files automatically, you just need to add a build.dart file in the root directory of your project, with the following content:

import 'package:stream/rspc.dart';
void main(List<String> arguments) {
  build(arguments);
}

With this build.dart script, whenever your RSP is modified, it will be re-compiled.

Compile Manually

To compile a RSP file manually, run rspc (RSP compiler) to compile it into the dart file with command line interface as follows:

dart -c lib/rspc.dart -n dir1 dir2 file1 fire2...

A dart file is generated for each RSP file you gave. Fore more options, please run:

dart -c lib/rspc.dart -h

Notes to Contributors

Fork Stream

If you'd like to contribute back to the core, you can fork this repository and send us a pull request, when it is ready.

Please be aware that one of Stream's design goals is to keep the sphere of API as neat and consistency as possible. Strong enhancement always demands greater consensus.

If you are new to Git or GitHub, please read this guide first.

Who Uses

  • Quire - a simple, collaborative, multi-level task management tool.
  • Keikai - a sophisticated spreadsheet for big data
  • Ottava - a no-code SaaS platform simplifying data management, chart creation, and data analysis.

所属分类

依赖

依赖清单 7 项

源码仓库

使用此插件的项目