clack

2021-08-07

Web application environment for Common Lisp

Upstream URL

github.com/fukamachi/clack

Author

Eitaro Fukamachi

License

LLGPL

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.

Dependencies (20)

  • alexandria
  • babel
  • bordeaux-threads
  • cl-async
  • cl-fastcgi
  • cl-ppcre
  • dexador
  • fast-http
  • fast-io
  • flexi-streams
  • http-body
  • hunchentoot
  • lack
  • quri
  • rove
  • split-sequence
  • toot
  • uiop
  • usocket
  • wookie
  • GitHub
  • Quicklisp
  • Sponsor