Web application environment for Common Lisp
Common Lisp Nginx
Permalink
Failed to load latest commit information.
roswell Fix parse-value in clackup.ros to be able to read "nil". Oct 5, 2015
src Allow a writer function to take NIL as the body. Sep 24, 2016
t Allow to use a random port for each subtest in handler test suites. Aug 19, 2015
tmp forgot to add "tmp" directory, using clack.test.suite. Jan 25, 2011
v1-compat Fix clack.middleware.postmodern. Sep 19, 2016
.gitignore Fix JSON middleware to recognize Content-Type that specifies a charse… Oct 19, 2013
.travis.yml Use the latest QURI. Sep 9, 2016
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 Clean clack-handler-hunchentoot up. Mar 26, 2015
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 Replace Drakma by Dexador. Sep 2, 2016
clack-v1-compat.asd Replace cl-fad by UIOP. Aug 26, 2015
clack.asd Don't raise a debugger when press C-c while clackup. Feb 20, 2016
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.