~bendersteed/wikisophy

45c6a61902a68412c19b7adb08d1c03c58cd3400 — Dimakakos Dimos 4 years ago e49fb15
Add: query handler
1 files changed, 7 insertions(+), 0 deletions(-)

M server.lisp
M server.lisp => server.lisp +7 -0
@@ 1,1 1,8 @@
(in-package wikisophy.server)

(hunchentoot:define-easy-handler (wikisophy :uri "/wikisophy") (query)
  (setf (hunchentoot:content-type*) "application/json")
  (cl-json:encode-json-to-string (wikisophy.crawler:path-to-philosophy query)))

(defvar *server* (make-instance 'hunchentoot:easy-acceptor :port 4242))
(hunchentoot:start *server*)