Search packages, repositories and app categories

Package detailsv0.0.8+3

pharaoh

Minimalist web-server library for Dart

AndroidiOSmacOSWindowsLinux
30-day downloads
129
Likes
33
Pub points
110

Install package

flutter pub add pharaoh

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Pharaoh is a minimalist web-server library for Dart, designed to provide a lightweight and efficient solution for building web servers. It emphasizes simplicity and performance, making it ideal for developers who want to create fast, scalable backend services with minimal boilerplate. Built with Dart's asynchronous capabilities, Pharaoh supports all major platforms including Android, iOS, macOS, Windows, and Linux, enabling cross-platform server development. Its clean API allows rapid prototyping and deployment of RESTful services or simple HTTP handlers.

Use cases

  • Building lightweight REST APIs
  • Creating cross-platform backend services
  • Prototyping web applications
  • Developing microservices
  • Implementing HTTP handlers

Key features

  • Minimalist design
  • Cross-platform support
  • Asynchronous I/O
  • Lightweight footprint
  • Simple API
  • High performance

Suitable for

  • Dart developers seeking simplicity
  • Projects requiring minimal overhead
  • Cross-platform server applications
  • Fast prototyping
  • Microservices architecture

Considerations

  • Not suitable for large-scale enterprise backends
  • Limited built-in middleware
  • Requires manual handling of advanced routing
  • Best for small to medium-sized applications
  • No built-in database integration

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Pharaoh 🏇

Test Pipeline codecov Pub Version likes melos

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

List of all contributors

License

MIT

Categories

Dependencies

Dependency list 14 items

Source repository

Projects using this package

No data available yet.