aboutsummaryrefslogtreecommitdiff
path: root/README.org
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2024-05-12 12:48:18 -0700
committercolin <colin@cicadas.surf>2024-05-12 12:48:18 -0700
commitc738009663ba243783b952a7fe0680c1dacee534 (patch)
treec8b171a2cf5cc28b336f43e94da6189ae8841ba9 /README.org
parent442d5e0616b8158eae5428b022254bdcb0cdaa62 (diff)
Add: defendpoint mention to readme
Diffstat (limited to 'README.org')
-rw-r--r--README.org25
1 files changed, 21 insertions, 4 deletions
diff --git a/README.org b/README.org
index e00eb8c..2755644 100644
--- a/README.org
+++ b/README.org
@@ -32,7 +32,7 @@ error is returned to the client. Otherwise ~handle~ is assumed to have
all it needs to produce the content to be returned to the requesting
client.
-*** Install
+** Install
Get dependencies not in quicklisp:
@@ -58,7 +58,8 @@ Ensure quicklisp knows about them, then quickload.
See [[https://cicadas.surf/cgit/colin/weekend.git/tree/examples][examples]] for a few examples.
-** Advantages of the Approach
+** Discussion
+*** Advantages of the Approach
OOPyness is an advantage. Object orientation allows one to:
@@ -78,7 +79,7 @@ OOPyness is an advantage. Object orientation allows one to:
subclass of ~ENDPOINT~ to alter the ~:route-parts~.
-** Defining Routes
+*** Defining Routes
All routes are defined by supplying route parts.
@@ -135,7 +136,7 @@ prefer ~:route-parts~ is that it allows for defining reusable regex
patterns and storing them in global parameters. See
examples/dice-roller.lisp.
-** Passing Values in Query Params
+*** Passing Values in Query Params
Here we modify the above example by only passing one argument in the
route, leaving the other to be a query parameter.
@@ -165,3 +166,19 @@ If ~bar-val~ had not been supplied in the query parameters, the
a 400 HTTP response code.
+
+*** ~DEFENDPOINT~ Macro
+
+Though not necessary, users may wish to avail themselves of a small
+endpoint-defining language called ~DEFENDPOINT~.
+
+See the [[https://cicadas.surf/cgit/colin/weekend.git/tree/examples/defendpoint-examples.lisp][defendpoint examples]].
+
+~DEFENDPOINT~ was made using [[https://cicadas.surf/cgit/colin/argot.git][argot]], a grammar-driven approach for
+defining DSL macros. As such, a docstring describing the grammar is
+generated and attached to the ~DEFENDPOINT~ macro - I suggest you
+consult it.
+
+#+begin_src lisp
+(print (documentation 'weekend:defendpoint 'function))
+#+end_src