Web server abstraction layer for Common Lisp
Clone or download
Latest commit c868f2d Jan 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
roswell Fix to work clackup without -S option (ref 1177ab2). Sep 24, 2018
src Fix conditional build Dec 8, 2018
t Squashed commit of the following: Mar 29, 2017
tmp forgot to add "tmp" directory, using clack.test.suite. Jan 25, 2011
v1-compat Squashed commit of the following: Mar 29, 2017
.gitignore Fix JSON middleware to recognize Content-Type that specifies a charse… Oct 19, 2013
.travis.yml Ignore ECL & CLISP builds. Mar 24, 2017
CONTRIBUTING.md Add CONTRIBUTING.md. Dec 16, 2015
README.markdown Add CONTRIBUTING.md. Dec 16, 2015
clack-handler-fcgi.asd Clean clack-handler-fcgi up. Mar 26, 2015
clack-handler-hunchentoot.asd Add clack-socket implementation for Hunchentoot handler. Feb 11, 2017
clack-handler-toot.asd Clean clack-handler-toot up. Mar 26, 2015
clack-handler-wookie.asd Add clack-socket to abstract :clack.io sockets in handlers. Aug 10, 2015
clack-socket.asd Add clack-socket to abstract :clack.io sockets in handlers. Aug 10, 2015
clack-test.asd Add :clack-handler-hunchentoot as a dependency of clack-test. (Thanks… May 11, 2018
clack-v1-compat.asd Replace cl-fad by UIOP. Aug 26, 2015
clack.asd Add a dependency on Lack.Middleware.Backtrace, which will be loaded i… Mar 28, 2017
t-clack-handler-fcgi.asd Move core files. Mar 26, 2015
t-clack-handler-hunchentoot.asd Move core files. Mar 26, 2015
t-clack-handler-toot.asd Move core files. Mar 26, 2015
t-clack-handler-wookie.asd Move core files. Mar 26, 2015
t-clack-v1-compat.asd Add clack.request & clack.response and fix tests. Mar 26, 2015

README.markdown

Clack - Web Application Environment for Common Lisp

Build Status Coverage Status Quicklisp dist

Clack is a web application environment for Common Lisp inspired by Python's WSGI and Ruby's Rack.

Usage

(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*).

Command-line interface

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.

Installation

(ql:quickload :clack)

Documentation

Server

How to contribute

See CONTRIBUTING.md.

See Also

  • Lack: Clack application builder

Author

Copyright

Copyright (c) 2011-2015 Eitaro Fukamachi & contributors

License

Licensed under the LLGPL License.