A blog and other things. https://etc.fsh.ee/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

35 lines
891 B

#lang cli
(require web-server/servlet
racket)
(require "server.rkt")
(flag (port p)
("-p" "--port" "web server will listen on this port")
(port (string->number p)))
(flag (wp url)
("-w" "--wordpress-url" "base wordpress url; no trailing slash")
(wp (string->url url)))
(flag (home h)
("-d" "--home-content" "content to show on homepage")
(home h))
(flag (post-cat c)
("-x" "--post-category" "integer of category")
(post-cat (string->number c)))
(flag (page-cat c)
("-y" "--page-category" "integer of category")
(page-cat (string->number c)))
(program (srv)
(let* ((srv (make-server (wp) (port) (home) (post-cat) (page-cat)))
(cache-refresher (first srv))
(start-server (second srv)))
(thread (lambda () (cache-refresher)))
(start-server)))
(run srv)