CLACKUP (APP &REST ARGS &KEY (SERVER HUNCHENTOOT) (PORT 5000) (DEBUG T))
Easy way to run Clack Application. You can specify backend server with passing `:server'. The default is `:hunchentoot'. Example: (clackup (lambda (env) (declare (ignore env)) '(200 nil ("ok"))) :port 5000 :debug t) (clackup #p"app.lisp" :server :fcgi :port 8080 :debug nil)
APPLY-MIDDLEWARE (APP MW-CLASS-NAME MW-PACKAGE &REST ARGS)
Apply a middleware to the `app'. This function is for resolving symbol packages in run-time.
Safer way to read and eval a file content. This function returns the last value.
FIND-HANDLER (SERVER &KEY (FORCE T))
Return a handler package. `server` must be a symbol or a keyword, not containing "Clack.Handler." as a prefix. Example: (find-handler :hunchentoot)
Load a handler system in run-time. `server` must be a symbol or a keyword. Example: (load-handler :hunchentoot)
MAKE-THREAD (FUNCTION &KEY NAME (INITIAL-BINDINGS *DEFAULT-SPECIAL-BINDINGS*))
Creates and returns a thread named NAME, which will call the function FUNCTION with no arguments: when FUNCTION returns, the thread terminates. NAME defaults to "Anonymous thread" if unsupplied. On systems that do not support multi-threading, MAKE-THREAD will signal an error. The interaction between threads and dynamic variables is in some cases complex, and depends on whether the variable has only a global binding (as established by e.g. DEFVAR/DEFPARAMETER/top-level SETQ) or has been bound locally (e.g. with LET or LET*) in the calling thread. - Global bindings are shared between threads: the initial value of a global variable in the new thread will be the same as in the parent, and an assignment to such a variable in any thread will be visible to all threads in which the global binding is visible. - Local bindings, such as the ones introduced by INITIAL-BINDINGS, are local to the thread they are introduced in, except that - Local bindings in the the caller of MAKE-THREAD may or may not be shared with the new thread that it creates: this is implementation-defined. Portable code should not depend on particular behaviour in this case, nor should it assign to such variables without first rebinding them in the new thread.
Returns true if THREAD is alive, that is, if DESTROY-THREAD has not been called on it.
SLURP-STREAM-TO-STRING (STREAM &KEY (EXTERNAL-FORMAT LATIN1))
CALL (COMP ENV)
Invoke component. Designed to be overriden in subclasses.
CALL-NEXT (THIS ENV)
WRAP (THIS APP-OR-MIDDLEWARE)
Standard output for a Clack running process. This variable will be used in `<clack-middleware-stdout>'.
Base Class for Clack Component shared between <middleware> and Clack Application.
Class for Clack Middleware.