法老
Dart 的极简 Web 服务器库
- 星标
- 144
- 复刻
- 18
- 最近推送(UTC)
- 2025年9月11日
- 项目状态
- 未归档
原始 README
以下为英文项目原文快照,最新内容请访问 GitHub。
Pharaoh 🏇
Features
- Robust routing
- Focus on high performance
- Super-high test coverage
- HTTP helpers (just like ExpressJS)
- Interoperability with Shelf Middlewares See here
Installing:
In your pubspec.yaml
dependencies:
pharaoh: ^0.0.6 # requires Dart => ^3.0.0
Basic Usage:
import 'package:pharaoh/pharaoh.dart';
void main() async {
final guestRouter = Pharaoh.router
..get('/user', (req, res) => res.ok("Hello World"))
..post('/post', (req, res) => res.json({"mee": "moo"}))
..put('/put', (req, res) => res.json({"pookey": "reyrey"}));
final app = Pharaoh()
..use((req, res, next) => next());
..get('/foo', (req, res) => res.ok("bar"))
..group('/guest', guestRouter);
await app.listen();
}
See the Pharaoh Examples directory for more practical use-cases.
Philosophy
Pharaoh emerges as a backend framework, inspired by the likes of ExpressJS, to empower developers in building comprehensive server-side applications using Dart. The driving force behind Pharaoh's creation is a strong belief in the potential of Dart to serve as the primary language for developing the entire architecture of a company's product. Just as the JavaScript ecosystem has evolved, Pharaoh aims to contribute to the Dart ecosystem, providing a foundation for building scalable and feature-rich server-side applications.
Contributors ✨
The Pharaoh project welcomes all constructive contributions. Contributions take many forms, from code for bug fixes and enhancements, to additions and fixes to documentation, additional tests, triaging incoming pull requests and issues, and more!
Contributing Code To Pharaoh 🛠
To setup and contribute to Pharaoh, Install Melos as a global package via pub.dev;
$ dart pub global activate melos
then initialize the workspace using the command below
$ melos bootstrap
Running Tests
To run the tests, you can either run dart test in the package you're working on or use the command below to run the full test suite:
$ melos run tests
People
License
分类
使用的依赖
依赖清单 1 项
- melos开发依赖
^3.2.0
如何选择适合项目的代码仓?
先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
- 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
- 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
- 使用前在 GitHub 核对 README、许可证与 Issues。
来源与维护
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗