Improve
This commit is contained in:
parent
4949324e05
commit
027077c97a
25 changed files with 123 additions and 217 deletions
src
12
src/app.lisp
12
src/app.lisp
|
@ -3,25 +3,20 @@
|
|||
(:use #:cl)
|
||||
(:local-nicknames (#:jg #:jingle))
|
||||
(:local-nicknames (#:fbr #:ningle-fbr))
|
||||
(:local-nicknames (#:mw #:hp/middlewares/*))
|
||||
(:local-nicknames (#:cfg #:hp/config))
|
||||
(:local-nicknames (#:mw #:hp/middlewares/*))
|
||||
(:export #:start
|
||||
#:stop
|
||||
#:update))
|
||||
(in-package #:hp)
|
||||
|
||||
(defparameter *app* (jg:make-app :address "localhost"
|
||||
:port 3000))
|
||||
:port cfg:*port*))
|
||||
|
||||
(defun start ()
|
||||
(uiop:run-program (if (cfg:dev-mode-p)
|
||||
"make dev"
|
||||
"make build"))
|
||||
(jg:start *app*))
|
||||
|
||||
(defun stop ()
|
||||
(when (cfg:dev-mode-p)
|
||||
(uiop:run-program "make stop"))
|
||||
(jg:stop *app*))
|
||||
|
||||
(defun setup ()
|
||||
|
@ -30,7 +25,8 @@
|
|||
(fbr:assign-routes *app*
|
||||
:system "hp"
|
||||
:directory "src/routes")
|
||||
(jg:static-path *app* "/assets/" "src/assets/")
|
||||
(jg:static-path *app* "/scripts/" "src/scripts/")
|
||||
(jg:static-path *app* "/styles/" "src/styles/")
|
||||
(jg:install-middleware *app* mw:*public-files*)
|
||||
(jg:install-middleware *app* mw:*recovery*)
|
||||
(jg:install-middleware *app* mw:*normalize-path*)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue