Next: Add "dev" profile.

master
Pierre Neidhardt 2020-05-02 18:45:26 +02:00
parent 0193442e12
commit 05266ad9ae
1 changed files with 20 additions and 0 deletions

View File

@ -212,3 +212,23 @@ Make sure you understand the security risks associated with this
before running this command."
(slynk:create-server :port slynk-port :dont-close t)
(echo "Slynk server started at port ~a" slynk-port)))
(defvar +dev-data-profile+ (make-instance 'data-profile :name "dev")
"Development profile.")
(defmethod next:expand-data-path ((path data-path) (profile (eql +dev-data-profile+)))
"Persist data to /tmp/next/."
(expand-default-path (make-instance (class-name (class-of path))
:basename (basename path)
:dirname "/tmp/next/")))
(defmethod next:expand-data-path ((path (eql *socket-path*)) (profile (eql +dev-data-profile+)))
"Return path of the socket."
(cond
((getf *options* :no-socket)
nil)
(t (expand-default-path
(make-instance 'data-path
:basename (or (getf *options* :socket) (basename path))
:dirname "/tmp/next/")))))