Fetch the repository succeeded.
Clack is a web application environment for Common Lisp inspired by Python's WSGI and Ruby's Rack.
(defvar *handler*
(clack:clackup
(lambda (env)
(declare (ignore env))
'(200 (:content-type "text/plain") ("Hello, Clack!")))))
Open your web browser and go to http://localhost:5000/. You should get "Hello, Clack!".
To stop the server, use (clack:stop *handler*)
.
Clack provides a script to start a web server. It's useful when you deploy to production environment.
NOTE: Install Roswell before as it depends on it.
When you execute ros install clack
, it copies clackup
script to $HOME/.roswell/bin
. Make sure the path is in your shell $PATH
.
$ ros install clack
$ which clackup
/Users/nitro_idiot/.roswell/bin/clackup
$ cat <<EOF >> app.lisp
(lambda (env)
(declare (ignore env))
'(200 (:content-type "text/plain") ("Hello, Clack!")))
EOF
$ clackup app.lisp
Hunchentoot server is started.
Listening on localhost:5000.
(ql:quickload :clack)
See CONTRIBUTING.md.
Copyright (c) 2011 Eitaro Fukamachi & contributors
Licensed under the MIT License.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。