Preliminary static assets serving.
This commit is contained in:
parent
cd36a88d12
commit
03c744e9f1
1 changed files with 7 additions and 4 deletions
|
@ -23,10 +23,10 @@
|
||||||
;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
;;
|
;;
|
||||||
(import (chicken process-context)
|
(import (chicken process-context)
|
||||||
srfi-4
|
|
||||||
(chicken file)
|
(chicken file)
|
||||||
(chicken pathname)
|
(chicken pathname)
|
||||||
(chicken format))
|
(chicken format)
|
||||||
|
(chicken io))
|
||||||
|
|
||||||
(define (get-argv)
|
(define (get-argv)
|
||||||
(let* ((args (argv))
|
(let* ((args (argv))
|
||||||
|
@ -78,8 +78,11 @@
|
||||||
(if (null? tree)
|
(if (null? tree)
|
||||||
alst
|
alst
|
||||||
(let* ((fpath (car tree))
|
(let* ((fpath (car tree))
|
||||||
(key (substring fpath dir-len))
|
(key0 (substring fpath dir-len))
|
||||||
(value (with-input-from-file fpath read-u8vector)))
|
(key (if (eq? (string-ref key0 0) #\/)
|
||||||
|
(substring key0 1)
|
||||||
|
key0))
|
||||||
|
(value (with-input-from-file fpath read-string)))
|
||||||
(loop (cdr tree)
|
(loop (cdr tree)
|
||||||
(cons (cons key value)
|
(cons (cons key value)
|
||||||
alst)))))))
|
alst)))))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue