Build proof-of-concept for arm.

This commit is contained in:
Dominik Pantůček 2025-04-08 20:03:24 +02:00
parent 002d677769
commit ec363eaefd
4 changed files with 29 additions and 7 deletions

View file

@ -3,10 +3,7 @@
default: ../brminv
SCRP=$(shell chicken-install -repository)
#SCRP=$(shell ../cross-chicken-arm/bin/arm-chicken-install -repository)
CSC=CHICKEN_REPOSITORY_PATH=../eggs:$(SCRP) csc
#CSC=CHICKEN_REPOSITORY_PATH=../eggs-arm:$(SCRP) ../cross-chicken-arm/bin/arm-csc
#CSC=../cross-chicken-arm/bin/arm-csc
BRMINV_SOURCES=brminv.scm frontend.import.scm command-line.import.scm \
util-proc.import.scm duck.import.scm texts.import.scm

View file

@ -109,11 +109,20 @@
(print dbconn)
(define (handle-api-calls)
#f)
(define plst (cdr (uri-path (request-uri (current-request)))))
(cond ((and (not (null? plst))
(equal? (car plst) "api"))
(send-response #:body "API call")
#t)
(else
#f)))
(handle-not-found
(lambda (path)
(define upath (string-intersperse (map ->string (cdr (uri-path (request-uri (current-request))))) "/"))
(define upath
(string-intersperse
(map ->string (cdr (uri-path (request-uri (current-request)))))
"/"))
(print 'log: upath)
(cond ((equal? upath "")
(send-response #:body (frontend-lookup "index.html")))
@ -133,7 +142,6 @@
(when (not (handle-api-calls))
(send-response #:body (frontend-lookup "index.html"))))))))))
(debug-log (current-error-port))
(accept-loop listener
(if ssl?
ssl-accept