Skip to content

Instantly share code, notes, and snippets.

@carrotflakes
Last active April 20, 2019 08:32
Show Gist options
  • Save carrotflakes/44f266ca4b2e12d490db53d201e51a5a to your computer and use it in GitHub Desktop.
Save carrotflakes/44f266ca4b2e12d490db53d201e51a5a to your computer and use it in GitHub Desktop.
fail-safe ningle app with woo server
(ql:quickload '(:ningle :clack))
(defvar *app* (make-instance 'ningle:<app>))
(setf (ningle:route *app* "/")
"Hello :)")
(setf (ningle:route *app* "/error")
(lambda (params)
(declare (ignore params))
(error "Oops!")))
(clack:clackup
(lack.builder:builder
(:backtrace
:result-on-error `(500 (:content-type "text/plain") ("Internal Server Error")))
*app*)
:port 3000
:server :woo
:use-default-middlewares nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment