From 643a3320399eb9717b64d9a7ab6b345b167acb02 Mon Sep 17 00:00:00 2001 From: SongWei Date: Thu, 13 Feb 2020 21:21:31 +1100 Subject: [PATCH] init --- server.lisp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 server.lisp diff --git a/server.lisp b/server.lisp new file mode 100644 index 0000000..ad10b4d --- /dev/null +++ b/server.lisp @@ -0,0 +1,22 @@ +(ql:quickload :woo) +(ql:quickload :flexi-streams) + + +(with-input-from-string (s "hahah 2333333") + (read-line s)) + +(woo:run + (lambda (env) + (print env) + (print (type-of env)) + (if (eq :post (getf env :request-method)) + (let* ((post-stream (getf env :raw-body)) + (char-stream (flexi-streams:make-flexi-stream + post-stream + :external-format :utf-8))) + (format t (read-line char-stream)))) + (format t "ret") + '(200 (:content-type "text/plain") ("Hello, World")))) + +(type-of 1) +