Compare commits

...

3 Commits

Author SHA1 Message Date
TakeV 95c2843175
Add a useful links section to the readme 2024-01-21 18:07:22 -05:00
TakeV 77fc9f6c99
Remove guix from the manifest.scm file
We kinda have to have guix to run it in the first place, no?
2024-01-21 18:06:46 -05:00
TakeV bde327be02
Add get payload for path method 2024-01-04 16:42:15 -05:00
3 changed files with 11 additions and 1 deletions

View File

@ -9,3 +9,6 @@ Like janetdocs or clojuredocs, but for guile!
Either run src_bash{scripts/launch-dev-shell} or run src_bash{guix shell -Df guix.scm -m manifest.scm} to get a developer environment.
manifest.scm is intended for dev tools related programs.
* Resources
** Useful Links
- https://systemreboot.net/post/live-hacking-a-guile-web-server

View File

@ -37,6 +37,14 @@
(define (directory? file-name)
(eq? (stat:type (stat file-name)) 'directory))
(define (get-payload-for-path path routing-table)
"Returns the first payload that matches the routing-table path"
(let ((filtered-table
(filter (lambda (routing-entry)
(not (equal? path (uri-path (car routing-entry)))))
routing-table)))
(cdr (car filtered-table))))
(define (serve-file path)
(define %prefix `(,(getcwd) "public"))
(define (prepend-prefix path) (string-join (append %prefix `(,path)) file-name-separator-string))

View File

@ -5,5 +5,4 @@
(specifications->manifest (list "guile-colorized"
"guile-hall"
"guile-readline"
"guix"
"git"))