This commit is contained in:
Akira Tempaku 2024-01-30 00:48:47 +09:00
commit 72ef5ae639
12 changed files with 174 additions and 0 deletions

24
src/main.lisp Normal file
View file

@ -0,0 +1,24 @@
(defpackage :hp
(:nicknames #:hp/main)
(:use #:cl)
(:import-from #:clack)
(:import-from #:lack)
(:import-from #:hp/pages/**/*
#:*index-app*)
(:export #:start-app
#:stop-app))
(in-package :hp)
(defparameter *handler* nil)
(defun start-app ()
(unless *handler*
(setf *handler* (clack:clackup (lack:builder *index-app*)
:address "localhost"
:port 3000))))
(defun stop-app ()
(when *handler*
(clack:stop *handler*)
(setf *handler* nil)
t))