https://github.com/hashload/horse
Fast, opinionated, minimalist web framework for Delphi
https://github.com/hashload/horse
api delphi embarcadero fpc framework freepascal horse lazarus middlewares minimalist rest restful web webservices
Last synced: about 1 month ago
JSON representation
Fast, opinionated, minimalist web framework for Delphi
- Host: GitHub
- URL: https://github.com/hashload/horse
- Owner: HashLoad
- License: mit
- Created: 2018-09-29T00:25:44.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-04-24T11:08:40.000Z (11 months ago)
- Last Synced: 2025-06-27T15:38:24.828Z (9 months ago)
- Topics: api, delphi, embarcadero, fpc, framework, freepascal, horse, lazarus, middlewares, minimalist, rest, restful, web, webservices
- Language: Pascal
- Homepage:
- Size: 125 MB
- Stars: 1,241
- Watchers: 114
- Forks: 227
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
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`](https://github.com/HashLoad/boss) command:
``` sh
boss install horse
```
* (Optional) Install [**wizard**](https://github.com/HashLoad/horse-wizard)
## ⚡️ Quickstart Delphi
```delphi
uses Horse;
begin
THorse.Get('/ping',
procedure(Req: THorseRequest; Res: THorseResponse)
begin
Res.Send('pong');
end);
THorse.Listen(9000);
end.
```
## ⚡️ Quickstart Lazarus
```delphi
{$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](https://github.com/HashLoad/jhonson) | ✔️ | ✔️ |
| [horse/basic-auth](https://github.com/HashLoad/horse-basic-auth) | ✔️ | ✔️ |
| [horse/cors](https://github.com/HashLoad/horse-cors) | ✔️ | ✔️ |
| [horse/stream](https://github.com/HashLoad/horse-octet-stream) | ✔️ | ✔️ |
| [horse/jwt](https://github.com/HashLoad/horse-jwt) | ✔️ | ✔️ |
| [horse/exception](https://github.com/HashLoad/handle-exception) | ✔️ | ✔️ |
| [horse/logger](https://github.com/HashLoad/horse-logger) | ✔️ | ✔️ |
| [horse/compression](https://github.com/HashLoad/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!
| Middleware | Delphi | Lazarus |
| ---------------------------------------------------------------------------------------------------------- | -------------------- | --------------------------- |
| [bittencourtthulio/etag](https://github.com/bittencourtthulio/Horse-ETag) | ✔️ | ✔️ |
| [bittencourtthulio/paginate](https://github.com/bittencourtthulio/Horse-Paginate) | ✔️ | ✔️ |
| [bittencourtthulio/cachecontrol](https://github.com/bittencourtthulio/horse-cachecontrol) | ✔️ | ❌ |
| [gabrielbaltazar/gbswagger](https://github.com/gabrielbaltazar/gbswagger) | ✔️ | ❌ |
| [willhubner/socketIO](https://github.com/WillHubner/Horse-SocketIO) | ✔️ | ❌ |
| [dliocode/ratelimit](https://github.com/dliocode/horse-ratelimit) | ✔️ | ❌ |
| [dliocode/slowdown](https://github.com/dliocode/horse-slowdown) | ✔️ | ❌ |
| [giorgiobazzo/upload](https://github.com/giorgiobazzo/horse-upload) | ✔️ | ❌ |
| [dliocode/query](https://github.com/dliocode/horse-query) | ✔️ | ❌ |
| [CarlosHe/healthcheck](https://github.com/CarlosHe/horse-healthcheck) | ✔️ | ❌ |
| [CarlosHe/staticfiles](https://github.com/CarlosHe/horse-staticfiles) | ✔️ | ❌ |
| [CachopaWeb/horse-server-static](https://github.com/CachopaWeb/horse-server-static) | ✔️ | ✔️ |
| [arvanus/horse-exception-logger](https://github.com/arvanus/horse-exception-logger) | ✔️ | ✔️ |
| [claudneysessa/Horse-CSResponsePagination](https://github.com/claudneysessa/Horse-CSResponsePagination) | ✔️ | ❌ |
| [claudneysessa/Horse-XSuperObjects](https://github.com/claudneysessa/Horse-XSuperObjects) | ✔️ | ❌ |
| [andre-djsystem/horse-bearer-auth](https://github.com/andre-djsystem/horse-bearer-auth) | ✔️ | ✔️ |
| [andre-djsystem/horse-manipulate-request](https://github.com/andre-djsystem/horse-manipulate-request) | ✔️ | ✔️ |
| [andre-djsystem/horse-manipulate-response](https://github.com/andre-djsystem/horse-manipulate-response) | ✔️ | ✔️ |
| [antoniojmsjr/Horse-IPGeoLocation](https://github.com/antoniojmsjr/Horse-IPGeoLocation) | ✔️ | ❌ |
| [antoniojmsjr/Horse-XMLDoc](https://github.com/antoniojmsjr/Horse-XMLDoc) | ✔️ | ❌ |
| [isaquepinheiro/horse-jsonbr](https://github.com/HashLoad/JSONBr) | ✔️ | ❌ |
| [IagooCesaar/Horse-JsonInterceptor](https://github.com/IagooCesaar/Horse-JsonInterceptor) | ✔️ | ❌ |
| [dliocode/horse-datalogger](https://github.com/dliocode/horse-datalogger) | ✔️ | ❌ |
| [marcobreveglieri/horse-prometheus-metrics](https://github.com/marcobreveglieri/horse-prometheus-metrics) | ✔️ | ❌ |
| [weslleycapelari/horse-documentation](https://github.com/weslleycapelari/horse-documentation) | ✔️ | ❌ |
## Delphi Versions
`Horse` works with Delphi 13 Florence, Delphi 12 Athens, 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](https://github.com/HashLoad/horse/blob/master/LICENSE).
## 📐 Tests
  