2013-10-30 01:09:09 +01:00
|
|
|
unit WebModuleUnit;
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses System.SysUtils,
|
|
|
|
System.Classes,
|
|
|
|
Web.HTTPApp,
|
|
|
|
MVCFramework;
|
|
|
|
|
|
|
|
type
|
|
|
|
Twm = class(TWebModule)
|
|
|
|
procedure WebModuleCreate(Sender: TObject);
|
|
|
|
private
|
|
|
|
MVCEngine: TMVCEngine;
|
|
|
|
end;
|
|
|
|
|
|
|
|
var
|
|
|
|
WebModuleClass: TComponentClass = Twm;
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
2013-11-08 23:10:25 +01:00
|
|
|
uses
|
|
|
|
TestServerControllerU;
|
2013-10-30 01:09:09 +01:00
|
|
|
|
|
|
|
procedure Twm.WebModuleCreate(Sender: TObject);
|
|
|
|
begin
|
|
|
|
MVCEngine := TMVCEngine.Create(self);
|
|
|
|
MVCEngine.AddController(TTestServerController);
|
|
|
|
MVCEngine.Config['stompserver'] := 'localhost';
|
|
|
|
MVCEngine.Config['stompserverport'] := '61613';
|
|
|
|
MVCEngine.Config['stompusername'] := 'guest';
|
|
|
|
MVCEngine.Config['stomppassword'] := 'guest';
|
|
|
|
end;
|
|
|
|
|
|
|
|
end.
|