Skip to content
This repository has been archived by the owner on Jan 25, 2019. It is now read-only.

TBrookSettings.Port; #49

Closed
silvioprog opened this issue Aug 4, 2013 · 6 comments
Closed

TBrookSettings.Port; #49

silvioprog opened this issue Aug 4, 2013 · 6 comments

Comments

@silvioprog
Copy link
Owner

Would be nice if you could configure the project port in TBrookSettings, e.g:

unit Brokers;

{$mode objfpc}{$H+}

interface

uses
  BrookFCLHTTPAppBroker, BrookUtils;

implementation

initialization
  BrookSettings.Port := 8080;

end.
@leledumbo
Copy link
Collaborator

Yes, that would be much nicer than current hack:

(BrookApp.Instance as TBrookHTTPApplication).Port := 8080;

It't damn ugly...

@uaply
Copy link
Collaborator

uaply commented Aug 5, 2013

I wonder why we at all need all this tricks with IBrookApplication interface and .Instance access method.

Anyway BrookRegisterApp() uses global variable, why just not make this global variable public?
Just like it's done in http://svn.freepascal.org/svn/fpc/trunk/packages/fcl-web/src/base/fpfcgi.pp

@silvioprog
Copy link
Owner Author

Public variables are practical, but unfortunately it is bad programming practice. :(

I'm working in this feature, maybe I do a commit today. ...

silvioprog added a commit that referenced this issue Aug 10, 2013
@silvioprog
Copy link
Owner Author

Can I close this issue friends, is working well for you too?

@uaply
Copy link
Collaborator

uaply commented Aug 18, 2013

Yeah, now I use a new way of assigning port number and it does work well.

@silvioprog
Copy link
Owner Author

Thank you very much! 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants