delphimvcframework/samples/serversideviews/WebModuleU.pas
2015-10-18 16:34:10 +02:00

34 lines
600 B
ObjectPascal

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}
uses SampleControllerU;
procedure TWebModule1.WebModuleCreate(Sender: TObject);
begin
DMVC := TMVCEngine.Create(self);
DMVC.Config[TMVCConfigKey.DocumentRoot] := '..\..\www';
DMVC.Config[TMVCConfigKey.ViewPath] := '..\..\templates';
DMVC.AddController(TSampleController);
end;
end.