This repository contains an implementation of a website written in GNU Guile.

Zelphir Kaltstahl ed20309717 correct pointer for submodule fslib hace 3 años
app ed20309717 correct pointer for submodule fslib hace 3 años
guix-env 62245c52fb remove fslib from manifest for now hace 3 años
test dc9c900cc7 add test file hace 3 años
.gitignore 2492979145 add gitignore file hace 3 años
.gitmodules e277455caa add fslib as submodule for now hace 3 años
LICENSE 15d0081e3f Initial commit hace 3 años
guix-env.org 7b61389e5d add environment and documentation files hace 3 años
readme.md 3713997887 update readme hace 3 años
readme.org 40d4fd2d22 add todo list hace 3 años
todo.org 668059caf6 note idea with cronjob meetup api hace 3 años

readme.md

Dependencies

  • GNU Guile as programming language
  • guile-fslib for handling of locations of static files in the file system
  • guile-fibers for the concurrent web server

Environment creation

The 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"

Usage

Starting the server

  1. activate the GNU Guix environment:

    bash guix-env/env.bash
    
  2. 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
    
  3. The website should now be reachable at http://localhost:8080.

OUTDATED Unit tests

To run the unit tests, issue the guile command for the specific tests as follows:

guile -L . test/test-path-handling.scm