2014-04-01 00:02:31 +02:00
|
|
|
unit WebModuleUnit1;
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses System.SysUtils,
|
|
|
|
System.Classes,
|
|
|
|
Web.HTTPApp,
|
|
|
|
MVCFramework;
|
|
|
|
|
|
|
|
type
|
|
|
|
TWebModule1 = class(TWebModule)
|
|
|
|
procedure WebModuleCreate(Sender: TObject);
|
|
|
|
|
|
|
|
private
|
|
|
|
MVC: TMVCEngine;
|
|
|
|
|
|
|
|
public
|
|
|
|
{ Public declarations }
|
|
|
|
end;
|
|
|
|
|
|
|
|
var
|
|
|
|
WebModuleClass: TComponentClass = TWebModule1;
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
|
|
uses AppControllerU;
|
|
|
|
|
|
|
|
procedure TWebModule1.WebModuleCreate(Sender: TObject);
|
|
|
|
begin
|
|
|
|
MVC := TMVCEngine.Create(Self);
|
2016-03-24 15:29:54 +01:00
|
|
|
MVC.Config[TMVCConfigKey.SessionTimeout] := '10'; //10minutes
|
2014-04-01 00:02:31 +02:00
|
|
|
MVC.Config[TMVCConfigKey.DefaultContentType] := 'text/plain';
|
|
|
|
|
|
|
|
MVC.AddController(TApp1MainController);
|
|
|
|
end;
|
|
|
|
|
|
|
|
end.
|