This repository contains an implementation of a website written in GNU Guile.
Zelphir Kaltstahl ed20309717 correct pointer for submodule fslib | 3 years ago | |
---|---|---|
app | 3 years ago | |
guix-env | 3 years ago | |
test | 3 years ago | |
.gitignore | 3 years ago | |
.gitmodules | 3 years ago | |
LICENSE | 3 years ago | |
guix-env.org | 3 years ago | |
readme.md | 3 years ago | |
readme.org | 3 years ago | |
todo.org | 3 years ago |
guile-fslib
for handling of locations of static files in the file systemguile-fibers
for the concurrent web serverThe dependencies specified above can be installed using GNU Guix and the following specifications for an environment:
Channels definition:
guix describe --format='channels' > guix-env/channels.scm
Manifest:
(specifications->manifest
'("guile"
"guile-fibers"
"guile-json"
"guile-fslib"))
Bash script for activating the environment:
#!/usr/bin/env bash
set -Eeuxo pipefail
DIR=$(dirname "$(readlink -f "${0}")")
guix time-machine \
--channels="${DIR}/channels.scm" -- \
environment \
--manifest="${DIR}/manifest.scm"
activate the GNU Guix environment:
bash guix-env/env.bash
Start the server:
# GUILE_LOAD_PATH="$(pwd)/app:${GUILE_LOAD_PATH}"
# once guile-fslib is on GNU Guix:
# guile -L app app/main.scm
# for now:
pushd app
guile -L . -L lib/fslib --fresh-auto-compile main.scm
The website should now be reachable at http://localhost:8080
.
To run the unit tests, issue the guile
command for the specific tests as follows:
guile -L . test/test-path-handling.scm