diff options
-rw-r--r-- | README.org | 25 |
1 files changed, 21 insertions, 4 deletions
@@ -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 |