A website template for Common Lisp
Start building an app quickly.
- Hunchentoot, Easy-routes
- Djula templates
- a welcome screen
- a form to search products ("product 1"…)
- a list of products
- run as a script or build a binary.
See also our cl-cookieweb project generator.
How to run the app
There are two possibilities to run the app from the command line:
rlwrap sbcl --load run.lisp
In that case, we are dropped into the Lisp REPL, so we can interact with the running application. It is specially useful to reload settings (contact information,…).
Or build the binary and run it:
make build ./myproject
Set the port:
PORT=9999 rlwrap sbcl --load run.lisp
You can use a starter configuration file:
In there, you can do anything in Lisp. You probably want to write things after
(in-package myproject), but that is not mandatory. For example, you can overwrite the
The file will be
load'ed at startup, in the context of the
C-c C-k in Slime),
(ql:quickload :myproject) and then
- load static files => use the regular
- anything more useful for a web app
- the real world app from where I extracted this template (it reads a DB, it has a shopping basket and a validation form that sends an email to the owner).
- my preliminary notes on live-reloading a lisp web app: https://github.com/vindarel/lisp-web-live-reload-example
- how to connect to a remote running image with a Swank server: https://lispcookbook.github.io/cl-cookbook/debugging.html#remote-debugging