Compare commits

..

3 commits

Author SHA1 Message Date
9ee1c73b7e
Hosting generously provided by alphamethyl 2022-09-01 14:59:59 +12:00
556c74cc53
Remove unnecessary requires in page-proxy 2022-09-01 14:56:07 +12:00
13c1b0636b
In breezewiki.rkt, start server in thread
This allows inspecting the program state using
(enter! "breezewiki.rkt") in the REPL.
2022-09-01 14:55:25 +12:00
3 changed files with 22 additions and 16 deletions

View file

@ -24,10 +24,13 @@
(set-reload-poll-interval! #f)) (set-reload-poll-interval! #f))
(reload!) (reload!)
(define ch (make-channel))
(define (start)
(serve/launch/wait (serve/launch/wait
#:listen-ip (if (config-true? 'debug) "127.0.0.1" #f) #:listen-ip (if (config-true? 'debug) "127.0.0.1" #f)
#:port (string->number (config-get 'port)) #:port (string->number (config-get 'port))
(λ (quit) (λ (quit)
(channel-put ch (lambda () (semaphore-post quit)))
(sequencer:make (sequencer:make
(pathprocedure:make "/" page-home) (pathprocedure:make "/" page-home)
(pathprocedure:make "/proxy" page-proxy) (pathprocedure:make "/proxy" page-proxy)
@ -35,4 +38,6 @@
(filter:make #rx"^/[a-z-]+/wiki/.+$" (lift:make page-wiki)) (filter:make #rx"^/[a-z-]+/wiki/.+$" (lift:make page-wiki))
(filter:make #rx"^/[a-z-]+/search$" (lift:make page-search)) (filter:make #rx"^/[a-z-]+/search$" (lift:make page-search))
static-dispatcher static-dispatcher
(lift:make page-not-found)))) (lift:make page-not-found)))))
(define server-t (thread start))
(define quit (channel-get ch))

View file

@ -57,9 +57,13 @@
(div (@ (class "internal-footer")) (div (@ (class "internal-footer"))
(img (@ (class "my-logo") (src "/static/breezewiki.svg"))) (img (@ (class "my-logo") (src "/static/breezewiki.svg")))
,(if (config-get 'instance-is-official) ,(if (config-get 'instance-is-official)
`(p ,(format "This instance is run by the ~a developer, " (config-get 'application-name)) `(div
(p ,(format "This instance is run by the ~a developer, " (config-get 'application-name))
(a (@ (href "https://cadence.moe/contact")) (a (@ (href "https://cadence.moe/contact"))
"Cadence.")) "Cadence."))
(p "Hosting generously provided by "
(a (@ (href "://alphamethyl.barr0w.net/"))
"alphamethyl.")))
`(p `(p
,(format "This unofficial instance is based off the ~a source code, but is not controlled by the code developer." (config-get 'application-name)))) ,(format "This unofficial instance is based off the ~a source code, but is not controlled by the code developer." (config-get 'application-name))))
(p "Text content on wikis run by Fandom is available under the Creative Commons Attribution-Share Alike License 3.0 (Unported), " (p "Text content on wikis run by Fandom is available under the Creative Commons Attribution-Share Alike License 3.0 (Unported), "

View file

@ -4,9 +4,6 @@
racket/port racket/port
; libs ; libs
(prefix-in easy: net/http-easy) (prefix-in easy: net/http-easy)
; html libs
html-parsing
html-writing
; web server libs ; web server libs
net/url net/url
web-server/http web-server/http