diff options
author | colin <colin@cicadas.surf> | 2022-12-28 12:56:20 -0800 |
---|---|---|
committer | colin <colin@cicadas.surf> | 2022-12-28 12:56:20 -0800 |
commit | ab0d667b3776786461d15112b648aafc3f00280f (patch) | |
tree | fe6224e48667f3a620033c5660e6bf63b34c5576 /package.lisp | |
parent | 72bcf7e66269af588d9daa9064de23d257cbd053 (diff) |
Refactor: to embrace the new dnd.api package more fully
The defendpoint* form installs the new endpoint into the default app,
which is just hte name of the package. In this case, the GET "/heroes"
endpoint is installed into the app called 'dnd.api:dnd.api
It is a bit wierd but that's the full name of the app that you'll need
to install into your http server instances.
I moved *dnd-arena* to the dnd package b/c the site/view app will also
be installed there. In addition, the conjure-arena function should
also be part of the "top level" dnd package.
In the package.lisp file, I reformatted the file a bit for
legibility. More importantly, I exported dnd.api and init-db from the
dnd.api package. In particular, the second export sends a clear signal
that the view/site code will not touch the model at all.
Diffstat (limited to 'package.lisp')
-rw-r--r-- | package.lisp | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/package.lisp b/package.lisp index ff06a36..16473c5 100644 --- a/package.lisp +++ b/package.lisp @@ -1,27 +1,30 @@ ;;;; package.lisp -(defpackage #:dnd +(defpackage #:dnd.api (:use #:cl) - (:local-nicknames (#:db #:bknr.datastore) - (#:idx #:bknr.indices) - (#:lzb #:lazybones) - (#:re #:cl-ppcre) - (#:json #:jonathan)) - (:import-from #:lazybones - #:defendpoint - #:defendpoint*) - (:import-from #:derrida - #:with-plist)) + (:local-nicknames + (#:db #:bknr.datastore) + (#:idx #:bknr.indices) + (#:lzb #:lazybones) + (#:re #:cl-ppcre) + (#:json #:jonathan)) + (:import-from + #:lazybones + #:defendpoint + #:defendpoint*) + (:import-from + #:derrida + #:with-plist) + (:export + #:dnd.api + #:init-db)) -(defpackage #:dnd.api +(defpackage #:dnd (:use #:cl) - (:local-nicknames (#:db #:bknr.datastore) - (#:idx #:bknr.indices) - (#:lzb #:lazybones) - (#:re #:cl-ppcre) - (#:json #:jonathan)) - (:import-from #:lazybones - #:defendpoint - #:defendpoint*) - (:import-from #:derrida - #:with-plist)) + (:local-nicknames + (#:lzb #:lazybones) + (#:api #:dnd.api)) + (:export + #:start)) + + ; the app's name |