81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
(string->number (args:get-arg "-port")))
(string->number (args:get-arg "-port"))
(if (and (config-lookup *configdat* "server" "port")
(string->number (config-lookup *configdat* "server" "port")))
(string->number (config-lookup *configdat* "server" "port"))
(+ 5000 (random 1001)))))
(link-tree-path (config-lookup *configdat* "setup" "linktree")))
(root-path (if link-tree-path
link-tree-path
(current-directory))) ;; WARNING: SECURITY HOLE. FIX ASAP!
(handle-directory spiffy-directory-listing)
;; http-transport:handle-directory) ;; simple-directory-handler)
;; Setup the web server and a /ctrl interface
;;
|
>
|
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
(string->number (args:get-arg "-port")))
(string->number (args:get-arg "-port"))
(if (and (config-lookup *configdat* "server" "port")
(string->number (config-lookup *configdat* "server" "port")))
(string->number (config-lookup *configdat* "server" "port"))
(+ 5000 (random 1001)))))
(link-tree-path (config-lookup *configdat* "setup" "linktree")))
(set! db *inmemdb*)
(root-path (if link-tree-path
link-tree-path
(current-directory))) ;; WARNING: SECURITY HOLE. FIX ASAP!
(handle-directory spiffy-directory-listing)
;; http-transport:handle-directory) ;; simple-directory-handler)
;; Setup the web server and a /ctrl interface
;;
|
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
|
(args:get-arg "-server")
"-"))) "Server run"))
(th3 (make-thread http-transport:keep-running "Keep running")))
;; (th1 (make-thread server:write-queue-handler "write queue")))
(set! *cache-on* #t)
(set! *db* (open-db))
(set! *inmemdb* (open-in-mem-db))
(set! db *inmemdb*)
(db:sync-to *db* *inmemdb*)
(thread-start! th2)
(thread-start! th3)
;; (thread-start! th1)
(set! *didsomething* #t)
(thread-join! th2))
|
<
|
507
508
509
510
511
512
513
514
515
516
517
518
519
520
|
(args:get-arg "-server")
"-"))) "Server run"))
(th3 (make-thread http-transport:keep-running "Keep running")))
;; (th1 (make-thread server:write-queue-handler "write queue")))
(set! *cache-on* #t)
(set! *db* (open-db))
(set! *inmemdb* (open-in-mem-db))
(db:sync-to *db* *inmemdb*)
(thread-start! th2)
(thread-start! th3)
;; (thread-start! th1)
(set! *didsomething* #t)
(thread-join! th2))
|