Add /ping endpoint

This commit is contained in:
Tony Garnock-Jones 2018-06-01 18:40:30 +01:00
parent 1291904a53
commit bb5f253b95

View File

@ -95,6 +95,7 @@
[("json" "tag-search-completions") json-tag-search-completions]
[("json" "formal-tags") json-formal-tags]
[("pkgs-all.json") pkgs-all-json]
[("ping") ping-page]
))
(define (on-continuation-expiry request)
@ -1469,6 +1470,11 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (ping-page request)
(response/full 200 #"Alive" (current-seconds) #"text/plain" '() '()))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; TODO: fold the collection of this information into the package
;; database itself.
(define (update-external-package-information! package-name)