-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathminiframe.pas
51 lines (43 loc) · 1019 Bytes
/
miniframe.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
program miniframe;
//{.$mode objfpc}{$H+}
{$I components\mORMot2\src\mormot.defines.inc}
{$ifdef OSWINDOWS}
{$apptype console}
{$R components\mORMot2\src\mormot.win.default.manifest.res}
{$endif OSWINDOWS}
uses
{$ifdef mswidows}
ShareMem,
{$endif}
mormot.core.os,
mormot.core.base,
mormot.core.zip,
mormot.net.http,
mormot.net.server,
mormot.net.async,
Classes, SysUtils, mormothttps,
miniscriptcontroller,
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
//Forms,testmain,
pascalscript, FileUtil
{ you can add units after this };
{$IFDEF FPC}
{$MODE Delphi}
{$ENDIF}
{$R *.res}
var
fSaveToFile: System.Text;
http: THttpAsyncServer;
begin
//控制台应用
AllocConsole;
System.Assign(fSaveToFile, '');
Rewrite(fSaveToFile);
{$ifdef OSPOSIX}
TTextRec(fSaveToFile).LineEnd := #13#10;
{$endif OSPOSIX}
TKing_HttpApiServer.StartService;
end.