Serve static site with clack in few lines
Written onWhile working on this blog I've stumbled on a basic need to serve static website from local folder. Though Coleslaw has magical command coleslaw preview it's good to know how to do it outside of Coleslaw.
There are numerous solutions in any language but we're talking CL here. And it's surprisingly simple:
- Install
clackwithros install clack - Create
app.lispin the target folder with the following content:(lack.app.file:make-app) - Run
clackup -s lack-middleware-static app.lispand enjoy.
To load "lack-middleware-static":
Load 1 ASDF system:
lack-middleware-static
; Loading "lack-middleware-static"
Hunchentoot server is going to start.
Listening on 127.0.0.1:5000.