2013-11-09 14:22:11 +01:00
|
|
|
unit WebModuleU;
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses
|
|
|
|
System.SysUtils, System.Classes,
|
|
|
|
Web.HTTPApp, MVCFramework;
|
|
|
|
|
|
|
|
type
|
|
|
|
TWebModule1 = class(TWebModule)
|
|
|
|
procedure WebModuleCreate(Sender: TObject);
|
|
|
|
private
|
|
|
|
DMVC: TMVCEngine;
|
|
|
|
end;
|
|
|
|
|
|
|
|
var
|
|
|
|
WebModuleClass: TComponentClass = TWebModule1;
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
2014-04-01 19:36:05 +02:00
|
|
|
|
2013-11-09 14:22:11 +01:00
|
|
|
uses SampleControllerU;
|
|
|
|
|
|
|
|
procedure TWebModule1.WebModuleCreate(Sender: TObject);
|
|
|
|
begin
|
|
|
|
DMVC := TMVCEngine.Create(self);
|
2014-05-22 01:06:35 +02:00
|
|
|
DMVC.Config[TMVCConfigKey.DocumentRoot] := 'www';
|
2013-11-09 14:22:11 +01:00
|
|
|
DMVC.AddController(TSampleController);
|
|
|
|
end;
|
|
|
|
|
|
|
|
end.
|