Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fukamachi/clack
Web server abstraction layer for Common Lisp
https://github.com/fukamachi/clack
Last synced: 16 days ago
JSON representation
Web server abstraction layer for Common Lisp
- Host: GitHub
- URL: https://github.com/fukamachi/clack
- Owner: fukamachi
- License: mit
- Created: 2011-01-12T09:24:58.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2023-11-09T09:55:04.000Z (about 1 year ago)
- Last Synced: 2024-05-18T21:55:15.136Z (6 months ago)
- Language: Common Lisp
- Homepage:
- Size: 1.5 MB
- Stars: 1,024
- Watchers: 69
- Forks: 86
- Open Issues: 32
-
Metadata Files:
- Readme: README.markdown
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# 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 <> 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/)
## Resources
* [How to build a web app with Clack/Lack (1)](https://fukamachi.hashnode.dev/how-to-build-a-web-app-with-clack-and-lack-1)
* [jasom/clack-tutorial](https://github.com/jasom/clack-tutorial/blob/src/pages/getting-started-with-clack.org)## Server
* [Hunchentoot](http://weitz.de/hunchentoot/)
* [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 ([email protected])
## Copyright
Copyright (c) 2011 Eitaro Fukamachi & [contributors](https://github.com/fukamachi/clack/graphs/contributors)
## License
Licensed under the MIT License.