aboutsummaryrefslogtreecommitdiffhomepage
path: root/vampire.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'vampire.lisp')
-rw-r--r--vampire.lisp27
1 files changed, 18 insertions, 9 deletions
diff --git a/vampire.lisp b/vampire.lisp
index f149255..16665fc 100644
--- a/vampire.lisp
+++ b/vampire.lisp
@@ -7,8 +7,9 @@
(defvar *config* nil)
(defclass/std config ()
- ((datastore-directory :ir :std #P"/srv/parasite/store/")
- (static-directory :ir :std #P"/srv/parasite/static/")
+ ((datastore-directory :ir :std #P"/srv/vampire/store/")
+ (static-directory :ir :std #P"/srv/vampire/static/")
+ (swank-port :std nil :doc "If set, swank is started on this port.")
(port :ir :std 4919)
(downloader-threads :ir :std 5)))
@@ -39,11 +40,13 @@
(defun when-logged-in? (fn)
(<?> 'session-user fn 'redirect-to-root))
-(defun start (config)
+(defun start-vampire (config)
(setf *config* config)
(initialize-database config )
(start-downloader-service config)
- (initialize 'main
+ (clog:initialize 'main
+ :port (port config)
+ :host "localhost"
:extended-routing t
:static-root (static-directory config))
(set-on-new-window (when-logged-in? 'user-home-page) :path "/home")
@@ -51,10 +54,16 @@
(set-on-new-window (when-logged-in? 'playlist-page) :path "/playlist")
(set-on-new-window 'new-accout-page :path "/new-account")
(set-on-new-window (when-logged-in? 'explore-page) :path "/explore")
- (open-browser))
+
+ (when (swank-port config)
+ (swank:create-server :port (swank-port config))))
(defun hacking-start ()
- (start (make-instance
- 'config
- :static-directory (merge-pathnames "vampire-static/" (user-homedir-pathname))
- :datastore-directory (merge-pathnames "vampire-store/" (user-homedir-pathname)))))
+ (start-vampire (make-instance
+ 'config
+ :static-directory (merge-pathnames "vampire-static/" (user-homedir-pathname))
+ :datastore-directory (merge-pathnames "vampire-store/" (user-homedir-pathname))))
+ (clog:open-browser))
+
+
+