Commit 1f204a88 by Mac Stephens

added demo button and changed text on record management

parent eeb51594
......@@ -33,3 +33,9 @@ emSystemsWeb/Win32*
*.skincfg
emSystemsWebServer/source/__recovery/
*.zip
*.res
*.log
......@@ -2,6 +2,7 @@ object DMConnection: TDMConnection
Height = 256
Width = 337
object ApiConnection: TXDataWebConnection
URL = 'http://localhost:2002/website/'
Left = 48
Top = 80
end
......
......@@ -22,7 +22,7 @@ type
procedure LoadConfig(loadedProc: TProc<Boolean>);
public
const clientVersion = '0.1.0';
const clientVersion = '1.0.0';
procedure InitApp(readyProc: TProc);
procedure SetClientConfig(callback: TVersionCheckCallback);
end;
......
......@@ -45,18 +45,30 @@
<div class="hero-overlay d-flex justify-content-center align-items-center">
<div class="text-wrapper">
<h1 class="display-4">Custom Software, Comprehensive Support</h1>
<div class="w-50 mx-auto"> <!-- Adjust the width as needed -->
<p class="lead">Real connections. Reliable support. Software made for you.</p>
<!-- Constrain only the paragraph width -->
<div class="mx-auto" style="max-width: 540px;">
<p class="lead fs-3 mb-0">Real connections. Reliable support. Software made for you.</p>
</div>
<!-- Button sits outside the max-width block -->
<div class="mt-5">
<button type="button"
id="btn_demo"
class="btn btn-lg rounded-pill fw-semibold text-white shadow px-4 px-sm-5 py-2">
Request a Demo
</button>
</div>
</div>
</div>
</div>
</div>
<!--MAIN CONTAINER-->
<div class="container-main">
<!-- LEARN BOXES -->
<div class="learn-boxes py-5">
<div class="learn-boxes">
<div class="row mb-4 g-4 align-items-center bg-white shadow-sm rounded">
<div class="col-md-6">
<img src="images\honeycomb-new.png" alt="Logistics Image" class="img-fluid rounded">
......@@ -97,38 +109,36 @@
</div>
<!-- FOOTER -->
<footer class="bg-dark text-light">
<div class="container-main">
<div class="row text-center text-lg-start">
<!-- Logo Column -->
<div class="col-lg-4 col-md-4 mb-4 mb-md-0 d-flex justify-content-lg-start justify-content-center">
<a href="#FHome" class="navbar-brand">
<img src="images/EM_Logo_2c66a0.png" alt="EM_Logo" style="max-height: 30px">
<footer class="bg-dark text-light mt-5">
<div class="container-main py-4">
<div class="row gy-3 align-items-start text-center text-lg-start">
<div class="col-lg-4 d-flex justify-content-center justify-content-lg-start">
<a href="#FHome" class="navbar-brand m-0">
<img src="images/EM_Logo_2c66a0.png" alt="EM_Logo" style="height: 30px;">
</a>
</div>
<div class="col-lg-4 col-md-4 mb-4 mb-md-0">
<div>
<h5>Explore</h5>
<ul class="list-unstyled mb-0">
<li><a href="#FHome" id="homefooter">Home</a></li>
<li><a href="#FAboutUs" id="aboutusfooter">About Us</a></li>
<li><a href="#FContactUs" id="contactusfooter">Contact Us</a></li>
</ul>
</div>
<div class="col-lg-4">
<div class="h6 mb-2">Explore</div>
<ul class="list-unstyled mb-0 small">
<li class="mb-1"><a href="#FHome" id="homefooter" class="link-light text-decoration-none">Home</a></li>
<li class="mb-1"><a href="#FAboutUs" id="aboutusfooter" class="link-light text-decoration-none">About Us</a></li>
<li><a href="#FContactUs" id="contactusfooter" class="link-light text-decoration-none">Contact Us</a></li>
</ul>
</div>
<div class="col-lg-4 col-md-4 mb-4 mb-md-0">
<div>
<address>
4043 Maple Rd, Suite 211<br>
Amherst, NY 14226<br>
(716) 836-4910
</address>
</div>
<div class="col-lg-4">
<address class="mb-0 small opacity-75">
4043 Maple Rd, Suite 211<br>
Amherst, NY 14226<br>
(716) 836-4910
</address>
</div>
</div>
</div>
<div class="footer-copyright">
© 2011-2024 EM Systems Inc
<div class="border-top border-secondary mt-3 pt-3 text-center small opacity-75">
© 2011-2026 EM Systems Inc
</div>
</div>
</footer>
......
......@@ -62,7 +62,7 @@
<div class="row mb-4 g-4 align-items-center bg-white shadow-sm rounded">
<div class="col-md-12">
<div class="p-3 text-center">
<h2>Electronic Medical Records System</h2>
<h2>Records Retention Notification</h2>
<p class="mx-auto" style="max-width: 850px;">Emergent.MD is an easy-to-use, full-featured, state-of-the-art Electronic Medical Records System. It works
with just about any practice. It interfaces with your existing Practice Management System. And, we’ll tailor
it to fit your unique workflow requirements. It will improve efficiency and save money for your practice.
......@@ -74,7 +74,7 @@
<div class="row mb-4 g-4 align-items-center bg-gray shadow-sm rounded">
<div class="col-md-12">
<div class="p-3 text-center">
<h2>Vital Alerts Plus</h2>
<h2>Legal Hold Notices</h2>
<p class="mx-auto" style="max-width: 850px;">TeleCare Connex is a completely integrated telemonitoring solution that includes wireless mobile devices
for remote vital sign collection, and a web application for technicians and monitors to setup, enroll, and
actively or passively track patient status and provide health information accordingly. This helps to reduce
......@@ -86,7 +86,7 @@
<div class="row mb-4 g-4 align-items-center bg-white shadow-sm rounded">
<div class="col-md-12">
<div class="p-3 text-center">
<h2>Dictation Notepad</h2>
<h2>Freedom of Information Law (FOIL)</h2>
<p class="mx-auto" style="max-width: 850px;">Dictation Notepad is a simple app for dictating and sending notes using an android powered device. It
leverages speech recognition technology to accurately transform speech to text and it allows formatting and
editing of the text using voice commands. The audio is recorded and encoded to a small file size and saved
......
{
"ApiUrl" : "http://localhost:2004/emWebsite",
"AppUrl" : "http://localhost:2004/emWebsite"
"ApiUrl" : "http://localhost:2002/website/",
"AppUrl" : "http://localhost:2002/website/App"
}
......@@ -23,11 +23,7 @@ body {
z-index: 1030;
}
/* Default state of the navbar */
.em-navbar-wrap .navbar {
padding-top: 1rem;
padding-bottom: 1rem;
}
/* Transition for navbar logo size */
.em-brand img {
......@@ -115,7 +111,7 @@ body {
position: relative;
height: 50vh; /* Control the height of the hero section */
overflow: hidden;
margin-top: 50px;
margin-top: 45px;
}
.hero-image {
width: 100%;
......@@ -171,6 +167,23 @@ body {
text-shadow: 0px 0px 10px #000;
}
/* Section: Hero CTA button */
#btn_demo {
background-color: #2c66a0;
border-color: #2c66a0;
}
#btn_demo:hover {
background-color: #255a8b;
border-color: #255a8b;
}
#btn_demo:focus {
box-shadow: 0 0 0 .25rem rgba(44, 102, 160, .35);
}
/****************************************************************************************/
/* LEARN BOXES */
......
......@@ -170,18 +170,10 @@
<ResourceType>RCDATA</ResourceType>
<ResourceId>JpgImage_4</ResourceId>
</None>
<None Include="TMSWeb\Debug\images\computer_code.jpg">
<ResourceType>RCDATA</ResourceType>
<ResourceId>JpgImage_5</ResourceId>
</None>
<None Include="images\niagara.jpg">
<ResourceType>RCDATA</ResourceType>
<ResourceId>JpgImage_6</ResourceId>
</None>
<None Include="TMSWeb\Debug\images\niagara.jpg">
<ResourceType>RCDATA</ResourceType>
<ResourceId>JpgImage_7</ResourceId>
</None>
<None Include="index.html"/>
<None Include="test.html"/>
<None Include="css\spinner.css"/>
......@@ -233,84 +225,168 @@
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="Win32\Release\EMSystemsWebsite.exe" Configuration="Release" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>emSystemsWebsite.exe</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="css\App.css" Configuration="Debug" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="css\App.css" Configuration="Release" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="css\spinner.css" Configuration="Debug" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="css\spinner.css" Configuration="Release" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="images\EM_Logo2_Copy5-1024x173.png" Configuration="Debug" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="images\EM_Logo2_Copy5-1024x173.png" Configuration="Release" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="images\EM_Logo_#2c66a0.png" Configuration="Debug" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="images\EM_Logo_#2c66a0.png" Configuration="Release" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="images\EM_Logo_2c66a0.png" Configuration="Debug" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="images\EM_Logo_2c66a0.png" Configuration="Release" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="images\EM_Logo_White.png" Configuration="Debug" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="images\EM_Logo_White.png" Configuration="Release" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="images\computer_code.jpg" Configuration="Debug" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="images\computer_code.jpg" Configuration="Release" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="images\job-gcdf1cf1d3_1920-1536x925.jpg" Configuration="Debug" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="images\job-gcdf1cf1d3_1920-1536x925.jpg" Configuration="Release" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="images\niagara.jpg" Configuration="Debug" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="images\niagara.jpg" Configuration="Release" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="images\pexels-luis-gomes-546819.jpg" Configuration="Debug" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="images\pexels-luis-gomes-546819.jpg" Configuration="Release" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="images\table_with_computers.jpg" Configuration="Debug" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="images\table_with_computers.jpg" Configuration="Release" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="index.html" Configuration="Debug" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="index.html" Configuration="Release" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="test.html" Configuration="Debug" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="test.html" Configuration="Release" Class="ProjectFile">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployClass Name="AdditionalDebugSymbols">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
......
[Settings]
memoLogLevel=3
fileLogLevel=4
LogFileNum=12
webClientVersion=0.1.1
LogFileNum=34
webClientVersion=1.0.0
[SMTP]
Host=mail.em-sys.net
......
[2025-12-30 15:44:11.015][1] --- Initialization Timer Triggered ---
[2025-12-30 15:44:11.018][1] Exe version: 1.0.0.0
[2025-12-30 15:44:11.031][1] --TServerConfig.Create - start
[2025-12-30 15:44:11.039][1] --TServerConfig.Create - end
[2025-12-30 15:44:11.050][1] --LoadServerConfig - start
[2025-12-30 15:44:11.057][1] -- Config file: serverconfig.json
[2025-12-30 15:44:11.069][1] -- Config file found.
[2025-12-30 15:44:11.079][1] --TServerConfig.Create - start
[2025-12-30 15:44:11.089][1] --TServerConfig.Create - end
[2025-12-30 15:44:11.096][1] -- localConfig loaded from config file
[2025-12-30 15:44:11.105][1] -- serverConfig.Free - called
[2025-12-30 15:44:11.117][1] -- serverConfig := localConfig - called
[2025-12-30 15:44:11.123][1] -------------------------------------------------------------
[2025-12-30 15:44:11.135][1] -- serverConfig.Server url: http://localhost:2002/website/
[2025-12-30 15:44:11.141][1] -- serverConfig.adminPassword: whatisthisusedfor
[2025-12-30 15:44:11.153][1] -- serverConfig.jwtTokenSecret: super_secret0123super_secret4567
[2025-12-30 15:44:11.161][1] -- serverConfig.webAppFolder: static
[2025-12-30 15:44:11.171][1] --LoadServerConfig - end
[2025-12-30 15:44:11.187][1] ******************************************************
[2025-12-30 15:44:11.200][1] emWebsite XData Server
[2025-12-30 15:44:11.216][1] Version: 1.0.0.0
[2025-12-30 15:44:11.222][1] by EM Systems, Inc.
[2025-12-30 15:44:11.234][1] ******************************************************
[2025-12-30 15:44:11.259][1] --- StartApiServer: Initializing ---
[2025-12-30 15:45:18.462][1] --- Initialization Timer Triggered ---
[2025-12-30 15:45:18.464][1] Exe version: 1.0.0.0
[2025-12-30 15:45:18.478][1] --TServerConfig.Create - start
[2025-12-30 15:45:18.494][1] --TServerConfig.Create - end
[2025-12-30 15:45:18.506][1] --LoadServerConfig - start
[2025-12-30 15:45:18.520][1] -- Config file: serverconfig.json
[2025-12-30 15:45:18.535][1] -- Config file found.
[2025-12-30 15:45:18.544][1] --TServerConfig.Create - start
[2025-12-30 15:45:18.552][1] --TServerConfig.Create - end
[2025-12-30 15:45:18.563][1] -- localConfig loaded from config file
[2025-12-30 15:45:18.572][1] -- serverConfig.Free - called
[2025-12-30 15:45:18.578][1] -- serverConfig := localConfig - called
[2025-12-30 15:45:18.591][1] -------------------------------------------------------------
[2025-12-30 15:45:18.601][1] -- serverConfig.Server url: http://localhost:2002/website/
[2025-12-30 15:45:18.609][1] -- serverConfig.adminPassword: whatisthisusedfor
[2025-12-30 15:45:18.611][1] -- serverConfig.jwtTokenSecret: super_secret0123super_secret4567
[2025-12-30 15:45:18.613][1] -- serverConfig.webAppFolder: static
[2025-12-30 15:45:18.615][1] --LoadServerConfig - end
[2025-12-30 15:45:18.622][1] ******************************************************
[2025-12-30 15:45:18.635][1] emWebsite XData Server
[2025-12-30 15:45:18.643][1] Version: 1.0.0.0
[2025-12-30 15:45:18.653][1] by EM Systems, Inc.
[2025-12-30 15:45:18.660][1] ******************************************************
[2025-12-30 15:45:18.682][1] --- StartApiServer: Initializing ---
[2025-12-30 15:45:18.732][1] XData Server started at: http://localhost:2002/website/
[2025-12-30 15:45:18.734][1] --- StartApiServer: Complete ---
[2025-12-30 15:45:18.743][1] API Server started at: http://localhost:2002/website/
[2025-12-30 15:45:18.782][1] App server module listening at "http://localhost:2002/website/app", rootDir: static
[2025-12-30 15:45:18.784][1] App Server started at: http://localhost:2002/website/app
[2025-12-30 15:45:18.800][1] --- StartServer: Complete ---
[2026-01-05 13:42:59.803][1] --- Initialization Timer Triggered ---
[2026-01-05 13:42:59.806][1] Exe version: 1.0.0.0
[2026-01-05 13:42:59.823][1] --TServerConfig.Create - start
[2026-01-05 13:42:59.823][1] --TServerConfig.Create - end
[2026-01-05 13:42:59.839][1] --LoadServerConfig - start
[2026-01-05 13:42:59.842][1] -- Config file: serverconfig.json
[2026-01-05 13:42:59.850][1] -- Config file found.
[2026-01-05 13:42:59.874][1] --TServerConfig.Create - start
[2026-01-05 13:42:59.874][1] --TServerConfig.Create - end
[2026-01-05 13:42:59.889][1] -- localConfig loaded from config file
[2026-01-05 13:42:59.904][1] -- serverConfig.Free - called
[2026-01-05 13:42:59.906][1] -- serverConfig := localConfig - called
[2026-01-05 13:42:59.912][1] -------------------------------------------------------------
[2026-01-05 13:42:59.920][1] -- serverConfig.Server url: http://localhost:2002/website/
[2026-01-05 13:42:59.926][1] -- serverConfig.adminPassword: whatisthisusedfor
[2026-01-05 13:42:59.932][1] -- serverConfig.jwtTokenSecret: super_secret0123super_secret4567
[2026-01-05 13:42:59.940][1] -- serverConfig.webAppFolder: static
[2026-01-05 13:42:59.945][1] --LoadServerConfig - end
[2026-01-05 13:42:59.961][1] ******************************************************
[2026-01-05 13:42:59.971][1] emWebsite XData Server
[2026-01-05 13:42:59.980][1] Version: 1.0.0.0
[2026-01-05 13:42:59.991][1] by EM Systems, Inc.
[2026-01-05 13:42:59.998][1] ******************************************************
[2026-01-05 13:43:00.019][1] --- StartApiServer: Initializing ---
[2026-01-05 13:43:00.068][1] XData Server started at: http://localhost:2002/website/
[2026-01-05 13:43:00.068][1] --- StartApiServer: Complete ---
[2026-01-05 13:43:00.078][1] API Server started at: http://localhost:2002/website/
[2026-01-05 13:43:00.105][1] App server module listening at "http://localhost:2002/website/app", rootDir: static
[2026-01-05 13:43:00.108][1] App Server started at: http://localhost:2002/website/app
[2026-01-05 13:43:00.121][1] --- StartServer: Complete ---
[2026-01-14 15:16:07.252][1] --- Initialization Timer Triggered ---
[2026-01-14 15:16:07.254][1] Exe version: 1.0.0.0
[2026-01-14 15:16:07.260][1] --TServerConfig.Create - start
[2026-01-14 15:16:07.271][1] --TServerConfig.Create - end
[2026-01-14 15:16:07.287][1] --LoadServerConfig - start
[2026-01-14 15:16:07.289][1] -- Config file: serverconfig.json
[2026-01-14 15:16:07.300][1] -- Config file found.
[2026-01-14 15:16:07.307][1] --TServerConfig.Create - start
[2026-01-14 15:16:07.315][1] --TServerConfig.Create - end
[2026-01-14 15:16:07.324][1] -- localConfig loaded from config file
[2026-01-14 15:16:07.332][1] -- serverConfig.Free - called
[2026-01-14 15:16:07.339][1] -- serverConfig := localConfig - called
[2026-01-14 15:16:07.350][1] -------------------------------------------------------------
[2026-01-14 15:16:07.357][1] -- serverConfig.Server url: http://localhost:2002/website/
[2026-01-14 15:16:07.367][1] -- serverConfig.adminPassword: whatisthisusedfor
[2026-01-14 15:16:07.376][1] -- serverConfig.jwtTokenSecret: super_secret0123super_secret4567
[2026-01-14 15:16:07.387][1] -- serverConfig.webAppFolder: static
[2026-01-14 15:16:07.395][1] --LoadServerConfig - end
[2026-01-14 15:16:07.415][1] ******************************************************
[2026-01-14 15:16:07.423][1] emWebsite XData Server
[2026-01-14 15:16:07.432][1] Version: 1.0.0.0
[2026-01-14 15:16:07.442][1] by EM Systems, Inc.
[2026-01-14 15:16:07.452][1] ******************************************************
[2026-01-14 15:16:07.476][1] --- StartApiServer: Initializing ---
[2026-01-14 15:16:07.527][1] XData Server started at: http://localhost:2002/website/
[2026-01-14 15:16:07.529][1] --- StartApiServer: Complete ---
[2026-01-14 15:16:07.543][1] API Server started at: http://localhost:2002/website/
[2026-01-14 15:16:07.568][1] App server module listening at "http://localhost:2002/website/app", rootDir: static
[2026-01-14 15:16:07.583][1] App Server started at: http://localhost:2002/website/app
[2026-01-14 15:16:07.592][1] --- StartServer: Complete ---
[2026-01-14 16:27:34.851][1] --- Initialization Timer Triggered ---
[2026-01-14 16:27:34.860][1] Exe version: 1.0.0.0
[2026-01-14 16:27:34.869][1] --TServerConfig.Create - start
[2026-01-14 16:27:34.876][1] --TServerConfig.Create - end
[2026-01-14 16:27:34.887][1] --LoadServerConfig - start
[2026-01-14 16:27:34.899][1] -- Config file: serverconfig.json
[2026-01-14 16:27:34.906][1] -- Config file found.
[2026-01-14 16:27:34.916][1] --TServerConfig.Create - start
[2026-01-14 16:27:34.927][1] --TServerConfig.Create - end
[2026-01-14 16:27:34.936][1] -- localConfig loaded from config file
[2026-01-14 16:27:34.948][1] -- serverConfig.Free - called
[2026-01-14 16:27:34.958][1] -- serverConfig := localConfig - called
[2026-01-14 16:27:34.969][1] -------------------------------------------------------------
[2026-01-14 16:27:34.982][1] -- serverConfig.Server url: http://localhost:2002/website/
[2026-01-14 16:27:34.990][1] -- serverConfig.adminPassword: whatisthisusedfor
[2026-01-14 16:27:34.998][1] -- serverConfig.jwtTokenSecret: super_secret0123super_secret4567
[2026-01-14 16:27:35.007][1] -- serverConfig.webAppFolder: static
[2026-01-14 16:27:35.017][1] --LoadServerConfig - end
[2026-01-14 16:27:35.035][1] ******************************************************
[2026-01-14 16:27:35.044][1] emWebsite XData Server
[2026-01-14 16:27:35.056][1] Version: 1.0.0.0
[2026-01-14 16:27:35.064][1] by EM Systems, Inc.
[2026-01-14 16:27:35.077][1] ******************************************************
[2026-01-14 16:27:35.095][1] --- StartApiServer: Initializing ---
[2026-01-14 16:27:35.151][1] XData Server started at: http://localhost:2002/website/
[2026-01-14 16:27:35.151][1] --- StartApiServer: Complete ---
[2026-01-14 16:27:35.161][1] API Server started at: http://localhost:2002/website/
[2026-01-14 16:27:35.202][1] App server module listening at "http://localhost:2002/website/app", rootDir: static
[2026-01-14 16:27:35.202][1] App Server started at: http://localhost:2002/website/app
[2026-01-14 16:27:35.214][1] --- StartServer: Complete ---
[2026-01-14 16:27:48.874][2] VerifyVersion: client=0.1.0 server= mismatch=False
[2026-01-14 15:19:58.305][1] --- Initialization Timer Triggered ---
[2026-01-14 15:19:58.314][1] Exe version: 1.0.0.0
[2026-01-14 15:19:58.317][1] --TServerConfig.Create - start
[2026-01-14 15:19:58.327][1] --TServerConfig.Create - end
[2026-01-14 15:19:58.335][1] --LoadServerConfig - start
[2026-01-14 15:19:58.349][1] -- Config file: serverconfig.json
[2026-01-14 15:19:58.353][1] -- Config file found.
[2026-01-14 15:19:58.359][1] --TServerConfig.Create - start
[2026-01-14 15:19:58.375][1] --TServerConfig.Create - end
[2026-01-14 15:19:58.384][1] -- localConfig loaded from config file
[2026-01-14 15:19:58.391][1] -- serverConfig.Free - called
[2026-01-14 15:19:58.398][1] -- serverConfig := localConfig - called
[2026-01-14 15:19:58.405][1] -------------------------------------------------------------
[2026-01-14 15:19:58.412][1] -- serverConfig.Server url: http://localhost:2002/website/
[2026-01-14 15:19:58.419][1] -- serverConfig.adminPassword: whatisthisusedfor
[2026-01-14 15:19:58.427][1] -- serverConfig.jwtTokenSecret: super_secret0123super_secret4567
[2026-01-14 15:19:58.436][1] -- serverConfig.webAppFolder: static
[2026-01-14 15:19:58.447][1] --LoadServerConfig - end
[2026-01-14 15:19:58.462][1] ******************************************************
[2026-01-14 15:19:58.471][1] emWebsite XData Server
[2026-01-14 15:19:58.478][1] Version: 1.0.0.0
[2026-01-14 15:19:58.487][1] by EM Systems, Inc.
[2026-01-14 15:19:58.497][1] ******************************************************
[2026-01-14 15:19:58.516][1] --- StartApiServer: Initializing ---
[2026-01-14 15:19:58.570][1] XData Server started at: http://localhost:2002/website/
[2026-01-14 15:19:58.572][1] --- StartApiServer: Complete ---
[2026-01-14 15:19:58.582][1] API Server started at: http://localhost:2002/website/
[2026-01-14 15:19:58.611][1] App server module listening at "http://localhost:2002/website/app", rootDir: static
[2026-01-14 15:19:58.622][1] App Server started at: http://localhost:2002/website/app
[2026-01-14 15:19:58.633][1] --- StartServer: Complete ---
[2026-01-14 16:31:20.130][1] --- Initialization Timer Triggered ---
[2026-01-14 16:31:20.154][1] Exe version: 1.0.0.0
[2026-01-14 16:31:20.158][1] --TServerConfig.Create - start
[2026-01-14 16:31:20.170][1] --TServerConfig.Create - end
[2026-01-14 16:31:20.180][1] --LoadServerConfig - start
[2026-01-14 16:31:20.192][1] -- Config file: serverconfig.json
[2026-01-14 16:31:20.208][1] -- Config file found.
[2026-01-14 16:31:20.221][1] --TServerConfig.Create - start
[2026-01-14 16:31:20.232][1] --TServerConfig.Create - end
[2026-01-14 16:31:20.239][1] -- localConfig loaded from config file
[2026-01-14 16:31:20.251][1] -- serverConfig.Free - called
[2026-01-14 16:31:20.259][1] -- serverConfig := localConfig - called
[2026-01-14 16:31:20.267][1] -------------------------------------------------------------
[2026-01-14 16:31:20.282][1] -- serverConfig.Server url: http://localhost:2002/website/
[2026-01-14 16:31:20.286][1] -- serverConfig.adminPassword: whatisthisusedfor
[2026-01-14 16:31:20.296][1] -- serverConfig.jwtTokenSecret: super_secret0123super_secret4567
[2026-01-14 16:31:20.304][1] -- serverConfig.webAppFolder: static
[2026-01-14 16:31:20.315][1] --LoadServerConfig - end
[2026-01-14 16:31:20.336][1] ******************************************************
[2026-01-14 16:31:20.349][1] emWebsite XData Server
[2026-01-14 16:31:20.360][1] Version: 1.0.0.0
[2026-01-14 16:31:20.369][1] by EM Systems, Inc.
[2026-01-14 16:31:20.380][1] ******************************************************
[2026-01-14 16:31:20.399][1] --- StartApiServer: Initializing ---
[2026-01-14 16:31:20.460][1] XData Server started at: http://localhost:2002/website/
[2026-01-14 16:31:20.462][1] --- StartApiServer: Complete ---
[2026-01-14 16:31:20.472][1] API Server started at: http://localhost:2002/website/
[2026-01-14 16:31:20.506][1] App server module listening at "http://localhost:2002/website/app", rootDir: static
[2026-01-14 16:31:20.509][1] App Server started at: http://localhost:2002/website/app
[2026-01-14 16:31:20.522][1] --- StartServer: Complete ---
[2026-01-14 16:31:32.520][1] Contact form submitted. Name: Mac, Email: mac@em-sys.net, Subject: Test Subject, Message: testmessage
[2026-01-14 16:33:27.606][2] VerifyVersion: client=0.1.0 server= mismatch=False
[2026-01-14 16:43:34.930][2] VerifyVersion: client=0.1.0 server= mismatch=False
[2026-01-14 16:43:55.931][1] Contact form submitted. Name: mac, Email: mac@em-sys.net, Subject: test3, Message: test3
[2026-01-14 16:48:02.149][2] VerifyVersion: client=0.1.0 server= mismatch=False
[2026-01-14 16:48:15.513][1] Contact form submitted. Name: Mac, Email: mac@em-sys.net, Subject: test4, Message: test4
[2026-01-14 16:49:42.682][2] VerifyVersion: client=0.1.0 server=0.1.1 mismatch=True
[2026-01-14 16:49:45.939][2] VerifyVersion: client=0.1.0 server=0.1.1 mismatch=True
[2026-01-14 15:21:18.212][1] --- Initialization Timer Triggered ---
[2026-01-14 15:21:18.214][1] Exe version: 1.0.0.0
[2026-01-14 15:21:18.226][1] --TServerConfig.Create - start
[2026-01-14 15:21:18.234][1] --TServerConfig.Create - end
[2026-01-14 15:21:18.245][1] --LoadServerConfig - start
[2026-01-14 15:21:18.251][1] -- Config file: serverconfig.json
[2026-01-14 15:21:18.259][1] -- Config file found.
[2026-01-14 15:21:18.271][1] --TServerConfig.Create - start
[2026-01-14 15:21:18.277][1] --TServerConfig.Create - end
[2026-01-14 15:21:18.286][1] -- localConfig loaded from config file
[2026-01-14 15:21:18.291][1] -- serverConfig.Free - called
[2026-01-14 15:21:18.300][1] -- serverConfig := localConfig - called
[2026-01-14 15:21:18.307][1] -------------------------------------------------------------
[2026-01-14 15:21:18.316][1] -- serverConfig.Server url: http://localhost:2002/website/
[2026-01-14 15:21:18.322][1] -- serverConfig.adminPassword: whatisthisusedfor
[2026-01-14 15:21:18.331][1] -- serverConfig.jwtTokenSecret: super_secret0123super_secret4567
[2026-01-14 15:21:18.333][1] -- serverConfig.webAppFolder: static
[2026-01-14 15:21:18.342][1] --LoadServerConfig - end
[2026-01-14 15:21:18.363][1] ******************************************************
[2026-01-14 15:21:18.370][1] emWebsite XData Server
[2026-01-14 15:21:18.376][1] Version: 1.0.0.0
[2026-01-14 15:21:18.387][1] by EM Systems, Inc.
[2026-01-14 15:21:18.395][1] ******************************************************
[2026-01-14 15:21:18.416][1] --- StartApiServer: Initializing ---
[2026-01-14 15:21:18.460][1] XData Server started at: http://localhost:2002/website/
[2026-01-14 15:21:18.469][1] --- StartApiServer: Complete ---
[2026-01-14 15:21:18.476][1] API Server started at: http://localhost:2002/website/
[2026-01-14 15:21:18.521][1] App server module listening at "http://localhost:2002/website/app", rootDir: static
[2026-01-14 15:21:18.521][1] App Server started at: http://localhost:2002/website/app
[2026-01-14 15:21:18.536][1] --- StartServer: Complete ---
[2026-01-14 15:27:38.658][1] --- Initialization Timer Triggered ---
[2026-01-14 15:27:38.664][1] Exe version: 1.0.0.0
[2026-01-14 15:27:38.678][1] --TServerConfig.Create - start
[2026-01-14 15:27:38.688][1] --TServerConfig.Create - end
[2026-01-14 15:27:38.701][1] --LoadServerConfig - start
[2026-01-14 15:27:38.715][1] -- Config file: serverconfig.json
[2026-01-14 15:27:38.726][1] -- Config file found.
[2026-01-14 15:27:38.734][1] --TServerConfig.Create - start
[2026-01-14 15:27:38.746][1] --TServerConfig.Create - end
[2026-01-14 15:27:38.762][1] -- localConfig loaded from config file
[2026-01-14 15:27:38.765][1] -- serverConfig.Free - called
[2026-01-14 15:27:38.779][1] -- serverConfig := localConfig - called
[2026-01-14 15:27:38.781][1] -------------------------------------------------------------
[2026-01-14 15:27:38.783][1] -- serverConfig.Server url: http://localhost:2002/website/
[2026-01-14 15:27:38.785][1] -- serverConfig.adminPassword: whatisthisusedfor
[2026-01-14 15:27:38.795][1] -- serverConfig.jwtTokenSecret: super_secret0123super_secret4567
[2026-01-14 15:27:38.804][1] -- serverConfig.webAppFolder: static
[2026-01-14 15:27:38.819][1] --LoadServerConfig - end
[2026-01-14 15:27:38.839][1] ******************************************************
[2026-01-14 15:27:38.858][1] emWebsite XData Server
[2026-01-14 15:27:38.872][1] Version: 1.0.0.0
[2026-01-14 15:27:38.891][1] by EM Systems, Inc.
[2026-01-14 15:27:38.902][1] ******************************************************
[2026-01-14 15:27:38.916][1] --- StartApiServer: Initializing ---
[2026-01-14 15:27:38.989][1] XData Server started at: http://localhost:2002/website/
[2026-01-14 15:27:38.989][1] --- StartApiServer: Complete ---
[2026-01-14 15:27:39.013][1] API Server started at: http://localhost:2002/website/
[2026-01-14 15:27:39.085][1] App server module listening at "http://localhost:2002/website/app", rootDir: static
[2026-01-14 15:27:39.101][1] App Server started at: http://localhost:2002/website/app
[2026-01-14 15:27:39.116][1] --- StartServer: Complete ---
[2026-01-14 16:00:07.088][2] VerifyVersion: client=0.1.0 server=0.1.1 mismatch=True
[2026-01-14 16:00:11.648][2] VerifyVersion: client=0.1.0 server=0.1.1 mismatch=True
[2026-01-14 16:00:29.157][2] VerifyVersion: client=0.1.0 server=0.1.0 mismatch=False
[2026-01-14 16:17:07.622][2] VerifyVersion: client=0.1.0 server=0.1.0 mismatch=False
[2026-01-14 16:17:32.669][2] VerifyVersion: client=0.1.0 server=0.1.0 mismatch=False
[2026-01-14 16:25:28.559][2] VerifyVersion: client=0.1.0 server= mismatch=False
{
"Url": "http://localhost:2004/emWebsite",
"Url": "http://localhost:2002/website",
"JwtTokenSecret": "super_secret0123super_secret4567",
"AdminPassword": "whatisthisusedfor",
"WebAppFolder": "static",
......
......@@ -13,7 +13,8 @@ uses
Api.ServiceImpl in 'source\Api.ServiceImpl.pas',
Main in 'source\Main.pas' {FMain},
App.Server.Module in 'source\App.Server.Module.pas' {AppServerModule: TDataModule},
Common.Config in 'source\Common.Config.pas';
Common.Config in 'source\Common.Config.pas',
Common.Middleware.Logging in 'source\Common.Middleware.Logging.pas';
type
TMemoLogAppender = class( TInterfacedObject, ILogAppender )
......
......@@ -154,6 +154,7 @@
<DesignClass>TDataModule</DesignClass>
</DCCReference>
<DCCReference Include="source\Common.Config.pas"/>
<DCCReference Include="source\Common.Middleware.Logging.pas"/>
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
......@@ -189,6 +190,12 @@
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="bin\emSystemsWebServer.exe" Configuration="Release" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>emSystemsWebServer.exe</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployClass Name="AdditionalDebugSymbols">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
......
......@@ -2,7 +2,7 @@ object ApiServerModule: TApiServerModule
Height = 179
Width = 190
object SparkleHttpSysDispatcher: TSparkleHttpSysDispatcher
Left = 72
Left = 74
Top = 16
end
object XDataServer: TXDataServer
......@@ -13,11 +13,14 @@ object ApiServerModule: TApiServerModule
SwaggerUIOptions.Enabled = True
SwaggerUIOptions.ShowFilter = True
SwaggerUIOptions.TryItOutEnabled = True
Left = 72
Top = 90
Left = 70
Top = 88
object XDataServerCompress: TSparkleCompressMiddleware
end
object XDataServerCORS: TSparkleCorsMiddleware
end
object XDataServerGeneric: TSparkleGenericMiddleware
OnMiddlewareCreate = XDataServerGenericMiddlewareCreate
end
end
end
......@@ -6,9 +6,9 @@ uses
System.SysUtils, System.Classes, System.IniFiles,
Sparkle.HttpServer.Module, Sparkle.HttpServer.Context,
Sparkle.Comp.Server, Sparkle.Comp.HttpSysDispatcher,
XData.Comp.Server, XData.Comp.ConnectionPool,
XData.Comp.Server, XData.Comp.ConnectionPool, XData.OpenApi.Service,
Sparkle.Comp.GenericMiddleware, Sparkle.Comp.JwtMiddleware,
Sparkle.Comp.BasicAuthMiddleware, Sparkle.Comp.CorsMiddleware,
Sparkle.Comp.BasicAuthMiddleware, Sparkle.Comp.CorsMiddleware, Common.Middleware.Logging,
Sparkle.Comp.CompressMiddleware, VCL.Forms, XData.Server.Module, Common.Logging;
type
......@@ -17,42 +17,49 @@ type
XDataServer: TXDataServer;
XDataServerCompress: TSparkleCompressMiddleware;
XDataServerCORS: TSparkleCorsMiddleware;
XDataServerGeneric: TSparkleGenericMiddleware;
procedure XDataServerGenericMiddlewareCreate(Sender: TObject; var Middleware:
IHttpServerMiddleware);
public
procedure StartApiServer(ABaseUrl: string);
end;
const
SERVER_PATH_SEGMENT = 'api';
var
ApiServerModule: TApiServerModule;
implementation
{%CLASSGROUP 'Vcl.Controls.TControl'}
{$R *.dfm}
procedure TApiServerModule.StartApiServer(ABaseUrl: string);
var
Url: string;
begin
Logger.Log(1, '--- StartApiServer: Initializing ---');
XDataServer.BaseUrl := ABaseUrl;
try
SparkleHttpSysDispatcher.Start;
Logger.Log(1, 'XData Server started at: ' + XDataServer.BaseUrl);
except
on E: Exception do
begin
Logger.Log(5, 'Failed to start XData server: ' + E.Message);
raise;
end;
end;
RegisterOpenApiService;
Logger.Log(1, '--- StartApiServer: Complete ---');
end;
Url := ABaseUrl;
if not Url.EndsWith('/') then
Url := Url + '/';
Url := Url + SERVER_PATH_SEGMENT;
XDataServer.BaseUrl := Url;
SparkleHttpSysDispatcher.Start;
Logger.Log(1, Format('Api server module listening at "%s"', [XDataServer.BaseUrl]));
end;
procedure TApiServerModule.XDataServerGenericMiddlewareCreate(Sender: TObject;
var Middleware: IHttpServerMiddleware);
begin
Middleware := TLoggingMiddleware.Create(Logger);
end;
end.
......@@ -5,6 +5,10 @@ interface
uses
XData.Service.Common, System.JSON;
const
API_MODEL = 'api';
type
[ServiceContract]
IApiService = interface(IInvokable)
......@@ -15,4 +19,7 @@ type
implementation
initialization
RegisterServiceType(TypeInfo(IApiService));
end.
......@@ -115,8 +115,12 @@ begin
errorMsg := '';
if (webClientVersion <> '') and (ClientVersion <> webClientVersion) then
errorMsg := Format('Client version mismatch. Server expects %s but client is %s.',
[webClientVersion, ClientVersion]);
begin
Logger.Log(2, Format('VerifyVersion called with mismatch. Server expects %s but client is %s.',
[webClientVersion, ClientVersion]));
errorMsg := 'You are running the wrong version of the website, please click the button to update.';
end;
Result := TJSONObject.Create;
Result.AddPair('webClientVersion', webClientVersion);
......@@ -128,10 +132,6 @@ begin
end;
initialization
RegisterServiceType(TApiService);
......
unit Common.Middleware.Logging;
interface
uses
System.Classes, System.SysUtils,
Sparkle.HttpServer.Module,
Sparkle.HttpServer.Context,
Sparkle.Http.Headers,
Common.Logging;
type
TLoggingMiddleware = class(THttpServerMiddleware, IHttpServerMiddleware)
private
FLogger: ILogger;
function GetNewHttpRequestLog(Request: THttpServerRequest): ILog;
protected
procedure ProcessRequest(Context: THttpServerContext; Next: THttpServerProc); override;
public
constructor Create(ALogger: ILogger);
end;
THttpRequestLog = class( TInterfacedObject, ILog )
strict private
FMethod: string;
FUriPath: string;
FUriQuery: string;
FProtocol: string;
FRemoteIp: string;
FHeaders: string;
FContent: string;
FContentLength: Int64;
public
constructor Create(AMethod: string; AUriPath: string; AUriQuery: string;
AProtocol: string; ARemoteIp: string; AHeaders: string; AContent: string;
AContentLength: Int64);
function GetMessage: string;
end;
// THttpResponseLog = class( TInterfacedObject, ILog )
// strict private
// FMethod: string;
// FUriPath: string;
// FUriQuery: string;
// FProtocol: string;
// FRemoteIp: string;
// FHeaders: string;
// FContent: string;
// FContentLength: Int64;
// public
// constructor Create(AMethod: string; AUriPath: string; AUriQuery: string;
// AProtocol: string; ARemoteIp: string; AHeaders: string; AContent: string;
// AContentLength: Int64);
// function GetMessage: string;
// end;
implementation
{ TLoggingMiddleware }
constructor TLoggingMiddleware.Create(ALogger: ILogger);
begin
FLogger := TLogger.Create(ALogger);
end;
function TLoggingMiddleware.GetNewHttpRequestLog(
Request: THttpServerRequest): ILog;
var
Msg: TStrings;
Header: THttpHeaderInfo;
StringStream: TStringStream;
Headers, Content: string;
begin
Result := nil;
Msg := TStringList.Create;
try
if Length(Request.Headers.AllHeaders.ToArray) = 0 then
Headers := ''
else
begin
for Header in Request.Headers.AllHeaders do
Msg.Add(Header.Name + ': ' + Header.Value);
Headers := Msg.Text;
end;
finally
Msg.Free;
end;
StringStream := TStringStream.Create(Request.Content);
try
Content := StringStream.DataString
finally
StringStream.Free;
end;
Result := THttpRequestLog.Create(
Request.Method,
Request.Uri.Path,
Request.Uri.Query,
Request.Protocol,
Request.RemoteIp,
Headers,
Content,
Request.ContentLength
);
end;
procedure TLoggingMiddleware.ProcessRequest(Context: THttpServerContext;
Next: THttpServerProc);
var
RequestLogMessage: string;
begin
FLogger.Log(1, 'TLoggingMiddleware.ProcessRequest:');
RequestLogMessage := GetNewHttpRequestLog(Context.Request).GetMessage;
Context.Response.OnHeaders(
procedure(Resp: THttpServerResponse)
begin
FLogger.Log(1, Format('--Resp.StatusCode: %d Resp.StatusReason: %s on %s',
[Resp.StatusCode, Resp.StatusReason, RequestLogMessage]));
end
);
FLogger.Log(1, Format('--Request.RemoteIP: %s RequestLogMessage: %s',
[Context.Request.RemoteIp, RequestLogMessage]));
Next(Context);
end;
{ THttpRequestLog }
constructor THttpRequestLog.Create(AMethod, AUriPath, AUriQuery,
AProtocol, ARemoteIp, AHeaders, AContent: string; AContentLength: Int64);
begin
FMethod := AMethod;
FUriPath := AUriPath;
FUriQuery := AUriQuery;
FProtocol := AProtocol;
FRemoteIp := ARemoteIp;
FHeaders := AHeaders;
FContent := AContent;
FContentLength := AContentLength;
end;
function THttpRequestLog.GetMessage: string;
var
Msg: TStrings;
begin
Result := '';
Msg := TStringList.Create;
try
Msg.Add(Format('%s %s %s',
[
FMethod,
FUriPath + FUriQuery,
FProtocol,
FRemoteIp
]));
// if Not FHeaders.IsEmpty then
// Msg.Add(FHeaders);
// if (Not FContent.IsEmpty) then
// Msg.Add(FContent);
Result := Trim(Msg.Text);
finally
Msg.Free;
end;
end;
end.
......@@ -10,12 +10,13 @@ object FMain: TFMain
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OnClose = FormClose
DesignSize = (
764
583)
TextHeight = 13
object memoInfo: TMemo
Left = 12
Left = 16
Top = 40
Width = 744
Height = 535
......
......@@ -19,7 +19,7 @@ type
procedure btnExitClick(Sender: TObject);
procedure btnSwaggerUIClick(Sender: TObject);
private
procedure StartServer;
procedure StartServers;
end;
var
......@@ -28,7 +28,7 @@ var
implementation
uses
Api.Server.Module, Sparkle.Utils, Api.Database, App.Server.Module;
Api.Server.Module, Sparkle.Utils, Api.Database, App.Server.Module, Api.Service, Api.ServiceImpl;
{$R *.dfm}
......@@ -44,17 +44,10 @@ begin
ShellExecute(Handle, 'open', PChar(TSparkleUtils.CombineUrlFast(ApiServerModule.XDataServer.BaseUrl, 'swaggerui')), nil, nil, SW_SHOWNORMAL);
end;
procedure TFMain.FormClose(Sender: TObject; var Action: TCloseAction);
begin
ApiServerModule.Free;
AppServerModule.Free;
serverConfig.Free;
end;
procedure TFMain.initTimerTimer(Sender: TObject);
begin
initTimer.Enabled := False;
Logger.Log(1, '--- Initialization Timer Triggered ---');
Caption := Caption + ' ver ' + ExeInfo1.FileVersion;
Logger.Log(1, 'Exe version: ' + ExeInfo1.FileVersion);
......@@ -62,7 +55,7 @@ begin
try
ServerConfig := TServerConfig.Create;
LoadServerConfig;
StartServer;
StartServers;
except
on E: Exception do
begin
......@@ -72,14 +65,15 @@ begin
end;
end;
procedure TFMain.StartServer;
procedure TFMain.StartServers;
var
appServerUrl: string;
begin
Logger.Log(1, '');
Logger.Log(1, '******************************************************');
Logger.Log(1, ' emWebsite XData Server ');
Logger.Log(1, Format(' Version: %s ', [FMain.ExeInfo1.FileVersion]));
Logger.Log(1, ' emWebsite XData Server ');
Logger.Log(1, Format(' Version: %s ', [FMain.ExeInfo1.FileVersion]));
Logger.Log(1, ' by EM Systems, Inc. ');
Logger.Log(1, '******************************************************');
Logger.Log(1, '');
......@@ -87,29 +81,34 @@ begin
try
ApiServerModule := TApiServerModule.Create(Self);
ApiServerModule.StartApiServer(ServerConfig.url);
Logger.Log(1, 'API Server started at: ' + ApiServerModule.XDataServer.BaseUrl);
memoInfo.Lines.Add('API Server started at: ' + ApiServerModule.XDataServer.BaseUrl);
appServerUrl := ServerConfig.url;
if not appServerUrl.EndsWith('/') then
appServerUrl := appServerUrl + '/';
appServerUrl := appServerUrl + 'app';
Logger.Log(1, 'API Server started at: ' + ApiServerModule.XDataServer.BaseUrl);
AppServerModule := TAppServerModule.Create(Self);
AppServerModule.StartAppServer(ServerConfig.url);
Logger.Log(1, 'App Server started at: ' + appServerUrl);
memoInfo.Lines.Add('App Server started at: ' + appServerUrl);
Logger.Log(1, '');
except
on E: Exception do
begin
Logger.Log(5, 'Error starting servers: ' + E.Message);
memoInfo.Lines.Add('Error starting servers: ' + E.Message);
Logger.Log(5, 'Failed to start server modules: ' + E.Message);
memoInfo.Lines.Add('Failed to start server modules: ' + E.Message);
end;
end;
Logger.Log(1, '--- StartServer: Complete ---');
Logger.Log(1, '--- StartServers: Complete ---');
end;
procedure TFMain.FormClose(Sender: TObject; var Action: TCloseAction);
begin
ApiServerModule.Free;
AppServerModule.Free;
serverConfig.Free;
end;
end.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment