vindarel / lisp-web-template-productlist

A web template with Hunchentoot, Easy-routes, Djula templates, Bulma CSS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

Uses Bulma CSS and used Bulma templates examples.

See also our cl-cookieweb project generator.

Welcome screen:

Searching products:

welcome screen

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

Config file

You can use a starter configuration file:

touch ~/.myproject.lisp

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 get-products function.

The file will be load'ed at startup, in the context of the myproject package.

Develop

Load myproject.asd (C-c C-k in Slime), (ql:quickload :myproject) and then (start).

TODO:

  • load static files => use the regular (hunchentoot:create-folder-dispatcher-and-handler #p"/path/to/static/").
  • anything more useful for a web app

See also:

Licence

WTFPL

About

A web template with Hunchentoot, Easy-routes, Djula templates, Bulma CSS.


Languages

Language:Common Lisp 98.5%Language:Makefile 1.5%