跳转至正文

命令行和服务端应用

与命令行和服务端应用有关的内容。

本文向你展示可以帮助你开发命令行式和服务器应用的相关工具和文档。

工具

#

DartPad
不管是对新手还是专家来说都易于使用的工具, DartPad 可以让你尝试语言相关功能和 dart:* 的 API。

Dart SDK
安装 Dart SDK 以获取 Dart 的核心库和 工具

框架

#

使用 Dart 编写的服务器端框架包括:

Serverpod
支持代码生成的可扩展应用服务器,包含身份验证、实时通信、数据库和缓存。

Dart Frog
一个快速、简约的 Dart 后端框架。

更多工具:
工具 界面链接了一些有用的工具,比如你喜欢的 IDE 或编辑器的 Dart 插件。

关于其他方案,请浏览 #server packages on pub.dev.

Cloud Functions for Firebase

#

Write Cloud Functions for Firebase using Dart to enable full-stack development, reuse code between your client and backend, and respond to Firebase triggers. To get started, see the Cloud Functions for Firebase documentation.

Firebase Functions package

The core package to write backend functions and APIs in Dart.

Firebase Admin SDK package

Access Firebase services securely from backend servers or Cloud Functions. Use it to manage data, send notifications, or verify auth tokens.

Firebase Functions for Dart repository

GitHub repository with quickstart guides, examples, and source code.

样例

#

一个基础的 Dart HTTP 服务器

一个基于 Cloud Firestore 的 Dart HTTP 服务器

更多资源

#

Dart API
dart:* 库的 API 参考。

dart:io 文档
向你展示如何使用 dart:io 库的主要功能。你可以在命令行脚本、服务器应用以及不包含 Web 平台的 Flutter 移动应用 中使用 dart:io 库。

使用 Google Cloud
Dart 服务器可使用的 Google Cloud 产品的指南和文档,例如 Cloud Run。

使用 Google API
帮助你在 Dart 应用中使用 Firebase 和 Google 客户端 API 的资源。