jennex

Our Wedding Site
git clone git://git.alexkarle.com.com/jennex
Log | Files | Refs | README | LICENSE

main.scm (597B) [raw]


      1 #!/usr/local/bin/chicken-csi -ss
      2 ;; main.scm -- configure and start the Spiffy web server
      3 (import 
      4   srfi-18
      5   spiffy
      6   spiffy-uri-match
      7   (chicken process-context)
      8   (chicken format))
      9 
     10 (include "handler.scm")  ;; contains 'routes'
     11 
     12 (access-log (current-output-port))
     13 (error-log (current-error-port))
     14 (root-path "../")
     15 
     16 ;; Spiffy recommends using vhost-map to assign dynamic routes
     17 ;; (even if we aren't using the vhost portion of it)
     18 (vhost-map `((".*" . ,(uri-match/spiffy routes))))
     19 
     20 (define (main args)
     21   (print (format "Starting up! Listening on port ~A..." (server-port)))
     22   (start-server))