The clack Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The clack Reference Manual

This is the clack Reference Manual, version 2.0.0, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 08:23:05 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

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

Author

Copyright

Copyright (c) 2011-2015 Eitaro Fukamachi & contributors

License

Licensed under the LLGPL License.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 clack

Author

Eitaro Fukamachi

License

LLGPL

Description

Web application environment for Common Lisp

Long Description

# Clack - Web Application Environment for Common Lisp

[![Build Status](https://travis-ci.org/fukamachi/clack.svg?branch=master)](https://travis-ci.org/fukamachi/clack)
[![Coverage Status](https://coveralls.io/repos/fukamachi/clack/badge.svg?branch=master)](https://coveralls.io/r/fukamachi/clack) [![Quicklisp dist](http://quickdocs.org/badge/clack.svg)](http://quickdocs.org/clack/)

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

## Usage

“‘common-lisp
(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/](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](https://github.com/snmsts/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

“‘common-lisp
(ql:quickload :clack)
“‘

## Documentation

- [Quickdocs Page](http://quickdocs.org/clack/)

## Server

* [Hunchentoot](http://weitz.de/hunchentoot/)
* [FastCGI](http://www.fastcgi.com/)
* [Wookie](http://wookie.beeets.com/)
* [Toot](https://github.com/gigamonkey/toot)
* [Woo](https://github.com/fukamachi/woo)

## How to contribute

See [CONTRIBUTING.md](CONTRIBUTING.md).

## See Also

* [Lack](https://github.com/fukamachi/lack): Clack application builder

## Author

* Eitaro Fukamachi (e.arrows@gmail.com)

## Copyright

Copyright (c) 2011-2015 Eitaro Fukamachi & [contributors](https://github.com/fukamachi/clack/graphs/contributors)

## License

Licensed under the LLGPL License.

Version

2.0.0

Dependencies
Source

clack.asd (file)

Component

src (module)


Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Previous: , Up: Modules   [Contents][Index]

3.1 clack/src

Parent

clack (system)

Location

src/

Components

Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 clack.asd

Location

clack.asd

Systems

clack (system)

Packages

clack-asd


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 clack/src/clack.lisp

Dependencies
Parent

src (module)

Location

src/clack.lisp

Packages

clack

Exported Definitions

clackup (function)

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 clack/src/handler.lisp

Dependency

util.lisp (file)

Parent

src (module)

Location

src/handler.lisp

Packages

clack.handler

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

4.1.4 clack/src/util.lisp

Parent

src (module)

Location

src/util.lisp

Packages

clack.util

Exported Definitions

find-handler (function)


Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

5.1 clack-asd

Source

clack.asd

Use List

Next: , Previous: , Up: Packages   [Contents][Index]

5.2 clack

Source

clack.lisp (file)

Use List

common-lisp

Exported Definitions

clackup (function)

Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.3 clack.handler

Source

handler.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Previous: , Up: Packages   [Contents][Index]

5.4 clack.util

Source

util.lisp (file)

Use List

common-lisp

Exported Definitions

find-handler (function)


Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Functions

Function: clackup APP &rest ARGS &key SERVER PORT DEBUG SILENT USE-THREAD USE-DEFAULT-MIDDLEWARES &allow-other-keys
Package

clack

Source

clack.lisp (file)

Function: find-handler SERVER
Package

clack.util

Source

util.lisp (file)

Function: run APP SERVER &rest ARGS &key USE-THREAD &allow-other-keys
Package

clack.handler

Source

handler.lisp (file)

Function: stop HANDLER
Package

clack.handler

Source

handler.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Macros

Macro: with-handle-interrupt INT-HANDLER &body BODY
Package

clack

Source

clack.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Functions

Function: copy-handler INSTANCE
Package

clack.handler

Source

handler.lisp (file)

Function: eval-file FILE

Safer way to read and eval a file content. This function returns the last value.

Package

clack

Source

clack.lisp (file)

Function: handler-acceptor INSTANCE
Function: (setf handler-acceptor) VALUE INSTANCE
Package

clack.handler

Source

handler.lisp (file)

Function: handler-p OBJECT
Package

clack.handler

Source

handler.lisp (file)

Function: handler-server INSTANCE
Function: (setf handler-server) VALUE INSTANCE
Package

clack.handler

Source

handler.lisp (file)

Function: make-handler &key (SERVER SERVER) (ACCEPTOR ACCEPTOR)
Package

clack.handler

Source

handler.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.3 Structures

Structure: handler ()
Package

clack.handler

Source

handler.lisp (file)

Direct superclasses

structure-object (structure)

Direct slots
Slot: server
Readers

handler-server (function)

Writers

(setf handler-server) (function)

Slot: acceptor
Readers

handler-acceptor (function)

Writers

(setf handler-acceptor) (function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L   M  
Index Entry  Section

C
clack.asd: The clack<dot>asd file
clack/src: The clack/src module
clack/src/clack.lisp: The clack/src/clack<dot>lisp file
clack/src/handler.lisp: The clack/src/handler<dot>lisp file
clack/src/util.lisp: The clack/src/util<dot>lisp file

F
File, Lisp, clack.asd: The clack<dot>asd file
File, Lisp, clack/src/clack.lisp: The clack/src/clack<dot>lisp file
File, Lisp, clack/src/handler.lisp: The clack/src/handler<dot>lisp file
File, Lisp, clack/src/util.lisp: The clack/src/util<dot>lisp file

L
Lisp File, clack.asd: The clack<dot>asd file
Lisp File, clack/src/clack.lisp: The clack/src/clack<dot>lisp file
Lisp File, clack/src/handler.lisp: The clack/src/handler<dot>lisp file
Lisp File, clack/src/util.lisp: The clack/src/util<dot>lisp file

M
Module, clack/src: The clack/src module

Jump to:   C   F   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
C   E   F   H   M   R   S   W  
Index Entry  Section

(
(setf handler-acceptor): Internal functions
(setf handler-server): Internal functions

C
clackup: Exported functions
copy-handler: Internal functions

E
eval-file: Internal functions

F
find-handler: Exported functions
Function, (setf handler-acceptor): Internal functions
Function, (setf handler-server): Internal functions
Function, clackup: Exported functions
Function, copy-handler: Internal functions
Function, eval-file: Internal functions
Function, find-handler: Exported functions
Function, handler-acceptor: Internal functions
Function, handler-p: Internal functions
Function, handler-server: Internal functions
Function, make-handler: Internal functions
Function, run: Exported functions
Function, stop: Exported functions

H
handler-acceptor: Internal functions
handler-p: Internal functions
handler-server: Internal functions

M
Macro, with-handle-interrupt: Internal macros
make-handler: Internal functions

R
run: Exported functions

S
stop: Exported functions

W
with-handle-interrupt: Internal macros

Jump to:   (  
C   E   F   H   M   R   S   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   A   S  
Index Entry  Section

A
acceptor: Internal structures

S
server: Internal structures
Slot, acceptor: Internal structures
Slot, server: Internal structures

Jump to:   A   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   H   P   S  
Index Entry  Section

C
clack: The clack system
clack: The clack package
clack-asd: The clack-asd package
clack.handler: The clack<dot>handler package
clack.util: The clack<dot>util package

H
handler: Internal structures

P
Package, clack: The clack package
Package, clack-asd: The clack-asd package
Package, clack.handler: The clack<dot>handler package
Package, clack.util: The clack<dot>util package

S
Structure, handler: Internal structures
System, clack: The clack system

Jump to:   C   H   P   S