Horse is an Express inspired web framework for Delphi and Lazarus.
Designed to ease things up for fast development in a minimalist way and with high performance.
⚙️ Installation
Installation is done using the boss install
command:
boss install horse
- (Optional) Install wizard
⚡️ Quickstart Delphi
uses Horse;
begin
THorse.Get('/ping',
procedure(Req: THorseRequest; Res: THorseResponse)
begin
Res.Send('pong');
end);
THorse.Listen(9000);
end.
⚡️ Quickstart Lazarus
{$MODE DELPHI}{$H+}
uses Horse;
procedure GetPing(Req: THorseRequest; Res: THorseResponse);
begin
Res.Send('Pong');
end;
begin
THorse.Get('/ping', GetPing);
THorse.Listen(9000);
end.
🧬 Official Middlewares
For a more maintainable middleware ecosystem, we've put official middlewares into separate repositories:
Middleware | Delphi | Lazarus |
---|---|---|
horse/json | ✔️ | ✔️ |
horse/basic-auth | ✔️ | ✔️ |
horse/cors | ✔️ | ✔️ |
horse/stream | ✔️ | ✔️ |
horse/jwt | ✔️ | ✔️ |
horse/exception | ✔️ | ✔️ |
horse/logger | ✔️ | ✔️ |
horse/compression | ✔️ | ✔️ |
🌱 Third Party Middlewares
This is a list of middlewares that are created by the Horse community, please create a PR if you want to see yours!
Delphi Versions
Horse
works with Delphi 11 Alexandria, Delphi 10.4 Sydney, Delphi 10.3 Rio, Delphi 10.2 Tokyo, Delphi 10.1 Berlin, Delphi 10 Seattle, Delphi XE8 and Delphi XE7.
💻 Code Contributors
⚠️ License
Horse
is free and open-source software licensed under the MIT License.
📐 Tests