Wookie异步 HTTP 服务器
Wookie 是一个用 Common Lisp 编写的异步 HTTP 服务器,基于 cl-async 和 http-parse 构建。
示例代码:
(defpackage :my-app
(:use :cl :wookie))
(in-package :my-app)
;; load Wookie's core plugins
(load-plugins)
;; define our homepage route
(defroute (:get "/") (req res)
(send-response res :body "Thanks for stopping by!"))
;; start serving requests!
(as:with-event-loop ()
(start-server (make-instance 'listener :port 80)))
评论