/components/fpweb/demo/helloworld/apache/mod_helloworld.lpr

http://github.com/graemeg/lazarus · Unknown · 38 lines · 27 code · 11 blank · 0 comment · 0 complexity · 35468e29c171b3ffaba5e278398f01cb MD5 · raw file

  1. Library mod_helloworld;
  2. {$mode objfpc}{$H+}
  3. Uses
  4. {$ifdef unix}
  5. cthreads,
  6. {$endif}
  7. httpd,fpApache, webmodule;
  8. Const
  9. { The following constant is used to export the module record. It must
  10. always match the name in the LoadModule statement in the apache
  11. configuration file(s). It is case sensitive !}
  12. ModuleName='mod_helloworld';
  13. { The following constant is used to determine whether the module will
  14. handle a request. It should match the name in the SetHandler statement
  15. in the apache configuration file(s). It is not case sensitive. }
  16. HandlerName=ModuleName;
  17. Var
  18. DefaultModule : module; {$ifdef unix} public name ModuleName;{$endif unix}
  19. Exports defaultmodule name ModuleName;
  20. {$IFDEF WINDOWS}{$R mod_helloworld.rc}{$ENDIF}
  21. begin
  22. Application.Title:='mod_helloworld';
  23. Application.ModuleName:=ModuleName;
  24. Application.HandlerName:=HandlerName;
  25. Application.SetModuleRecord(DefaultModule);
  26. Application.Initialize;
  27. end.