Browse files

Startup structure for client and server.

  • Loading branch information...
1 parent 880b72a commit a4ee623b7ada7723e083bc278e2c3b38fe9434bf @jwinnenb committed Jun 22, 2011
Showing with 39 additions and 3 deletions.
  1. 0 TODO.org
  2. +4 −0 src/kh/client/core.clj
  3. +31 −3 src/kh/core.clj
  4. +4 −0 src/kh/server/core.clj
View
0 TODO.org
No changes.
View
4 src/kh/client/core.clj
@@ -0,0 +1,4 @@
+(ns kh.client.core)
+
+(defn launch-client [& args]
+ (println "launch-server stub"))
View
34 src/kh/core.clj
@@ -1,6 +1,34 @@
-(ns kh.core)
+(ns kh.core
+ (:use
+ [kh.client core]
+ [kh.server core]
+ [clojure.contrib command-line])
+ (:gen-class))
(defn -main [& args]
(println "************************************************")
- (println " KH Core")
- (println "************************************************"))
+ (println " kh.core Started")
+ (println "************************************************")
+ (with-command-line
+ args
+ "KH Core"
+ [[server? S? "Launch the KH Master server."]
+ [client? C? "Launch the KH Client server."]
+ [master-server "IP of the KH Master server." nil]
+ [server-port "Port to launch the server on" 8080]
+ [client-port "Port to launch the client on" 8999]
+ [server-ssl-cert "Location of server SSL cert." nil]
+ [client-ssl-cert "Location of client SSL cert." nil]
+ [server-db-cred "Server Database credentials." nil]]
+ (println "Server: " server?)
+ (println "Server Port: " server-port)
+ (println "Server SSL Cert(req): " server-ssl-cert)
+ (println "Server DB Creds(req): " server-db-cred)
+ (println "Client: " client?)
+ (println "Master: " master-server)
+ (println "Client Port: " client-port)
+ (println "Client SSL Cert(req): " client-ssl-cert)
+ (when (and server? (not client?) server-port server-ssl-cert server-db-cred)
+ (launch-server server-port server-ssl-cert server-db-cred))
+ (when (and client? (not server?) client-port client-ssl-cert)
+ (launch-client client-port client-ssl-cert))))
View
4 src/kh/server/core.clj
@@ -0,0 +1,4 @@
+(ns kh.server.core)
+
+(defn launch-server [& args]
+ (println "launch-server stub"))

0 comments on commit a4ee623

Please sign in to comment.