]> Devoid-pointer.net GitWeb - Nine-Q.git/commitdiff
Load settings from config INI file instead of using hardcoded values
authorMichal Malý <madcatxster@devoid-pointer.net>
Sat, 20 Dec 2014 00:21:01 +0000 (01:21 +0100)
committerMichal Malý <madcatxster@devoid-pointer.net>
Sat, 20 Dec 2014 00:21:01 +0000 (01:21 +0100)
src/nine_q.adb

index 361c016ed1c952cb53e9bf7ac93b75532a3b5125..004df6747a57e19275ef50c35861542353b14759 100644 (file)
@@ -1,5 +1,5 @@
 with AWS.Config;
-with AWS.Config.Set;
+with AWS.Config.Ini;
 with AWS.Server;
 
 with Handlers;
@@ -8,13 +8,7 @@ procedure Nine_Q is
   Server_Config: AWS.Config.Object;
   Web_Server: AWS.Server.HTTP;
 begin
-  Server_Config := AWS.Config.Get_Current;
-  AWS.Config.Set.Session(Server_Config, True);
-  AWS.Config.Set.Server_Host(Server_Config, "localhost");
-  AWS.Config.Set.Server_Port(Server_Config, 18400);
-
-  AWS.Config.Set.Session_Lifetime(1800.0);
-  AWS.Config.Set.Session_Cleanup_Interval(3600.0);
+  AWS.Config.Ini.Read(Server_Config, "nine_q_config.ini");
 
   AWS.Server.Start(Web_Server => Web_Server,
                   Dispatcher => Handlers.Get_Dispatchers,