Giter Club home page Giter Club logo

Comments (8)

leledumbo avatar leledumbo commented on August 19, 2024

I wouldn't use either (except the console one for debugging), but rather install the server as a service/daemon. It's damn easy anyway, just add 1 unit to broker's uses clause.

from brookframework.

fajar-khairil avatar fajar-khairil commented on August 19, 2024

@Lele what unit to add?

from brookframework.

uaply avatar uaply commented on August 19, 2024

@michaelvanham
If you really need to run Brook server alongside with forms in Windows, you should place the whole Brook application in separate thread. There is no way to combine this functionality in single-threaded application. Handling of Windows messages requires one closed loop, while handling of server requests needs another loop, and both are blocking.

from brookframework.

silvioprog avatar silvioprog commented on August 19, 2024

@kodok-buncit, use the menu "File | New ... | Brook framework > Embedded daemon server". And in a terminal (as super user), run:

myapp -i

It runs your web server as daemon, without the ugly black window.

from brookframework.

silvioprog avatar silvioprog commented on August 19, 2024

Can I close this issue friends?

from brookframework.

michaelvanham avatar michaelvanham commented on August 19, 2024

Works great as a service.

For future readers: if you already have a Brook app setup to use the built in webserver, you can change it to operate as service by simply removing brookfclhttpappbroker from the uses clause, and adding brookfclhttpdaemonbroker instead.

Thanks everyone.

from brookframework.

herux avatar herux commented on August 19, 2024

Hallo, I need to change embedded web server port. how to do that ?

from brookframework.

OsvaldoTCF avatar OsvaldoTCF commented on August 19, 2024

unit Brokers;

{$mode objfpc}{$H+}

interface

uses
BrookFCLHttpAppBroker, BrookUtils, BrookFCLEventLogBroker;

implementation

initialization
BrookSettings.Port := 8080;
BrookSettings.LogActive:=true;
BrookSettings.LogFile:= './logbrook.txt';

end.

from brookframework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.