2014-03-10 17:39:29 +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}
|
|
|
|
|
|
|
|
|
2020-05-11 23:39:43 +02:00
|
|
|
uses RoutingSampleControllerU, MVCFramework.Commons;
|
2014-03-10 17:39:29 +01:00
|
|
|
|
|
|
|
procedure TWebModule1.WebModuleCreate(Sender: TObject);
|
|
|
|
begin
|
2020-05-11 23:39:43 +02:00
|
|
|
DMVC := TMVCEngine.Create(self,
|
|
|
|
procedure(Config: TMVCConfig)
|
|
|
|
begin
|
|
|
|
if IsConsole then
|
|
|
|
DMVC.Config['ISAPI_PATH'] := '/sampleisapi/isapiapp.dll';
|
|
|
|
end);
|
2014-03-10 17:39:29 +01:00
|
|
|
DMVC.AddController(TRoutingSampleController);
|
|
|
|
end;
|
|
|
|
|
|
|
|
end.
|