2018-06-30

web-app

small scheme web application framework

framework that initialises web applications, starts a server and provides optional modules for commonly needed features

similar perhaps to express.js

status: should work

features

initialises and deinitialises an application, runs a server, passes request objects to your handler procedure and transmits response objects

protocol agnostic: socket -> web-app -> socket

exchangeable server (thread-pool scgi, fibers scgi, direct http, ...)

composable projects. projects can derive from other projects

derivative environment configuration files in an s-expression format

functional, avoids side-effects: no "set!" used

basic routing on any request property with pattern matching

initialisation separate from server implementations, which is useful for testing

usable with a proxy like nginx for https, automatic chunked-encoding, fast file transfers, keep-alive, websockets, load-balancing, caching and general http robustness

optional modules

http requests/responses

templating with s-expression versions of xml (sxml), javascript (sescript) and css (plcss)

asset processing: transcompilation, bundling, minification, compression, formatting, etc

what makes sph-web-app fast?

plain vectors as records for request and response objects

response objects can have procedures that send data while it is generated

requests have little overhead, as little data is prepared

documentation

sph-web-app manual

dependencies

guile >= 2

sph-lib

optional

sescript for javascript from s-expressions

installation

manual

install all dependencies if there are some

download

download

alternatives: releases, git clone git://sph.mn/sph-web-app, github

unpack

unpack the downloaded archive

for example

tar -xf sph-web-app.tgz

-x is for extract

-f is for the source file name

install

cd sph-web-app
su root
./exe/install

in most cases the installer only copies files

the install script might have a "--help" option that lists more install options

pacman

using aurget

aurget -S --deps sph-web-app-git

related

(sph lang template)

(sph scgi)

plcss

sxml

used by

sph-cms

ytilitu.xyz

this website


tags: programming guile library scheme overview start q1 computer project web-app scgi framework web http sph-web-app functional