demorpcrtti.lpr 868 B

123456789101112131415161718192021222324252627282930313233
  1. {
  2. This file is part of the Free Component Library
  3. Minimal server program for JSON-RPC server.
  4. Copyright (c) 2022 by Michael Van Canneyt [email protected]
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. program demorpcrtti;
  12. {$mode objfpc}{$H+}
  13. {$if not defined(CPU386) and not defined(WIN64)}
  14. {$define useffi}
  15. {$endif}
  16. uses
  17. fphttpapp, rpcapi, dmRPC {$ifdef useffi}, ffi.manager {$endif}, myapi;
  18. begin
  19. Application.Title:='FPC JSON-RPC using RTTI';
  20. Application.Port:=8080;
  21. Application.Initialize;
  22. Application.Run;
  23. end.