summary refs log tree commit diff homepage
path: root/src/cli.cr
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli.cr')
-rw-r--r--src/cli.cr21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/cli.cr b/src/cli.cr
index 8cc79be..ecec1f8 100644
--- a/src/cli.cr
+++ b/src/cli.cr
@@ -27,26 +27,39 @@ enum Subcommand
 end
 
 struct Configuration
+  @sock : String
+  getter sock
   @db : Path
   getter db
-  @api : String
-  getter api
+  @css : Path
+  getter css
+
   @opennic_local : Path
   getter opennic_local
   @opennic_remote : String
   getter opennic_remote
+  @opennic_api : String
+  getter opennic_api
+
   @icann_local : Path
   getter icann_local
   @icann_remote : String
   getter icann_remote
+  @icann_api : String
+  getter icann_api
 
   def initialize(ini)
+    @sock = ini["general"]["sock"]
     @db = Path[ini["general"]["db"]]
-    @api = ini["general"]["api"]
+    @css = Path[ini["general"]["css"]]
+
     @opennic_local = Path[ini["opennic"]["local"]]
     @opennic_remote = ini["opennic"]["remote"]
+    @opennic_api = ini["opennic"]["api"]
+
     @icann_local = Path[ini["icann"]["local"]]
     @icann_remote = ini["icann"]["remote"]
+    @icann_api = ini["icann"]["api"]
   end
 end
 
@@ -115,7 +128,7 @@ end
   in .serve?
     server = Server.new cfg.not_nil!
     server.listen port do |address|
-      puts "Listening on http://#{address}"
+      puts "Listening on #{address}"
     end
   in .usage?
     die parser