aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--vampire.lisp15
1 files changed, 9 insertions, 6 deletions
diff --git a/vampire.lisp b/vampire.lisp
index 4f92b41..03b8830 100644
--- a/vampire.lisp
+++ b/vampire.lisp
@@ -7,12 +7,15 @@
(defvar *config* nil)
(defclass/std config ()
- ((datastore-directory :ir
- :std #P"/srv/parasite/store/")
- (port :ir
- :std 4919)
- (media-directory :ir
- :std #P"/srv/parasite/media/")))
+ ((datastore-directory :ir :std #P"/srv/parasite/store/")
+ (static-directory :ir :std #P"/srv/parasite/static/")
+ (port :ir :std 4919)
+ (downloader-threads :ir :std 5)))
+
+(defun config-from-file (path)
+ "PATH should be a path to a file containing a PLIST suitable for
+ passing as the keyword arguments to (MAKE-INSTANCE 'CONFIG ...)"
+ (apply #'make-instance 'config (read-from-file path)))
;;; RESOURCE MODEL