On 2018-06-29 23:21, Tonton wrote:
Hey.pp project looks more like what I'd like. I'll probably packa
Thank you both tantalum and Zelphir!
I'm not entirely sure what I need myself to be honest, this is very
much a
learning exercise; even though I have a goal to use it. That said, the
web-app project looks more like what I'd like. I'll probably package it
for
guix also, if I use it.
Let me know how it works
On Fri, 29 Jun 2018 18:42:15 +0000
tantalum <s...@posteo.eu> wrote:
hi, not sure if it is exactly what your looking for but it might be
useful for examples and matches the general question.
i maintain a project named "web-app" at http://sph.mn/c/view/mu or
https://github.com/sph-mn/sph-web-app
the core is small and working well for me so far, ive been maintaining
it for a long time. it starts a server and for each request gives a
request object to a user defined procedure, which then returns a
response object that is send back to the client.
it comes with an optional module for file processing (templates,
preprocessed files, bundling, etc) and has some more cool features
like
protocol independence (socket -> app -> socket), an exchangeable
server
(fibers included) and derived projects (using modules and symlinks).
the project hasnt gone through testing and feedback loops with other
users, and the documentation, while technically probably up to date,
needs revision i think. here is a minimal usage example, in a file
named
"example.scm":
(import (sph web app) (sph web app http))
(define (app-respond request) (respond "test"))
(define app (swa-create (quote project-name) app-respond))
(swa-start app #f swa-server-guile)
then running "guile example.scm" displays
listening on 127.0.0.1:6500
exit with ctrl+c
the app is then accessible with the browser at http://127.0.0.1:6500
--
Amirouche ~ amz3 ~ http://www.hyperdev.fr