Home

Awesome

Brook framework

Support this project via PayPal GitHub releases License: LGPL v2.1

Overview

Brook is a cross-platform microframework which helps to develop web Pascal applications built by Delphi or Lazarus IDE and Free Pascal. Its core has been developed using the Sagui library, that's why it is so fast, compact and useful to run on embedded systems.

Features

Examples

The example below shows a minimal hello world HTTP server:

type
  THTTPServer = class(TBrookHTTPServer)
  protected
    procedure DoRequest(ASender: TObject; ARequest: TBrookHTTPRequest;
      AResponse: TBrookHTTPResponse); override;
  end;

procedure THTTPServer.DoRequest(ASender: TObject; ARequest: TBrookHTTPRequest;
  AResponse: TBrookHTTPResponse);
begin
  AResponse.Send('Hello world', 'text/plain', 200);
end;

begin
  with THTTPServer.Create(nil) do
  try
    Port := 8080;
    Open;
    if not Active then
      Exit;
    WriteLn('Server running at http://localhost:', Port);
    ReadLn;
  finally
    Free;
  end;
end.

There are other examples available in the Examples directory.

Downloading

All stable releases are available to download via GetIt, OPM and GitHub releases page.

We strongly recommend you to install Brook using GetIt or OPM, however, if you want to download the very latest source from the Git repository, do this:

git clone https://github.com/risoflora/brookframework.git

It will create a directory named brookframework filled with the source code.

Documentation

The documentation has been written in PasDoc and is available in HTML format at brookframework-docs.

Targets

Successfully tested on:

compiled using:

Versioning

Starting from the version 1.0.0, Brook follows the SemVer rules regarding API changes with backwards compatibility across major releases.

Contributing

Brook framework is totally open source and would not be possible without our contributors. If you want to submit contributions, please fork the project on GitHub and send a pull request. You retain the copyright on your contributions.

Donations

Many open source projects, large and small, receive donations to encourage their authors, therefore, it would be not different in Brook.

All money collected from donations are invested to the purchase of study materials. This way, directly or indirectly, all knowledge acquired in the studies influence the spread of this project.

If you want to support this project, please choose one of the options below to make a donation.

Support this project via PayPal Support this project via PagSeguro

(For those who would like to donate in Brazilian BRL, it can be done by a identified bank deposit or via PayPal Brazil.)

Check the list of all donors that lovely supported this idea! :heart:

Community

Would you like to ask questions and talk to more Brook users?

Join us to the official group at Telegram and be welcome! :slightly_smiling_face:

Support

This project values being simple, direct and self-explanatory. However, if you need some help to integrate Brook to your application, we have the option of a paid consulting service. Contact us!

Projects using Brook

Would you like to add your project to that list above? Feel free to open a new issue requesting it! :-)

Licensing

Brook framework is released under GNU Lesser General Public License v2.1. Check the LICENSE file for more details.