2015-06-15 18:57:46 +02:00
|
|
|
unit WebModuleUnit1;
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
2016-06-16 22:13:35 +02:00
|
|
|
uses
|
|
|
|
System.SysUtils,
|
2015-06-15 18:57:46 +02:00
|
|
|
System.Classes,
|
|
|
|
Web.HTTPApp,
|
|
|
|
MVCFramework;
|
|
|
|
|
|
|
|
type
|
2016-06-16 22:13:35 +02:00
|
|
|
|
2015-06-15 18:57:46 +02:00
|
|
|
TWebModule1 = class(TWebModule)
|
|
|
|
procedure WebModuleCreate(Sender: TObject);
|
|
|
|
procedure WebModuleDestroy(Sender: TObject);
|
|
|
|
private
|
2016-06-16 22:13:35 +02:00
|
|
|
FMVCEngine: TMVCEngine;
|
2015-06-15 18:57:46 +02:00
|
|
|
public
|
|
|
|
{ Public declarations }
|
|
|
|
end;
|
|
|
|
|
|
|
|
var
|
|
|
|
WebModuleClass: TComponentClass = TWebModule1;
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
2016-06-16 22:13:35 +02:00
|
|
|
uses
|
|
|
|
App1MainControllerU;
|
2015-06-15 18:57:46 +02:00
|
|
|
|
|
|
|
procedure TWebModule1.WebModuleCreate(Sender: TObject);
|
|
|
|
begin
|
2016-06-16 22:13:35 +02:00
|
|
|
FMVCEngine := TMVCEngine.Create(Self);
|
|
|
|
FMVCEngine.Config['view_path'] := '..\Debug\HTML5Application';
|
|
|
|
FMVCEngine.Config['document_root'] := 'HTML5Application\public_html';
|
|
|
|
FMVCEngine.AddController(TApp1MainController);
|
2015-06-15 18:57:46 +02:00
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TWebModule1.WebModuleDestroy(Sender: TObject);
|
|
|
|
begin
|
2016-06-16 22:13:35 +02:00
|
|
|
FMVCEngine.free;
|
2015-06-15 18:57:46 +02:00
|
|
|
end;
|
|
|
|
|
|
|
|
end.
|