pull/9/head
Matthew Butterick 11 years ago
parent b752b16d45
commit 904d5bb8a8

@ -232,7 +232,8 @@
pollen/world pollen/world
pollen/project-requires pollen/project-requires
sugar sugar
txexpr) txexpr
hyphenate)
(define-namespace-anchor my-module-cache-ns-anchor) (define-namespace-anchor my-module-cache-ns-anchor)
(provide my-module-cache-ns-anchor)) (provide my-module-cache-ns-anchor))
@ -267,5 +268,6 @@
pollen/template pollen/template
pollen/world pollen/world
sugar sugar
txexpr)) txexpr
hyphenate))
(string->bytes/utf-8 (eval expr-to-eval (current-namespace))))) (string->bytes/utf-8 (eval expr-to-eval (current-namespace)))))

@ -26,9 +26,8 @@ File implicitly required into every Pollen source file from its directory.
#:value #t]{ #:value #t]{
A parameter that determines whether the @racket[world:pollen-require] file is checked for changes on every pass through @racket[render]. (Can be faster to turn this off if you don't need it.) Initialized to @racket[#t].} A parameter that determines whether the @racket[world:pollen-require] file is checked for changes on every pass through @racket[render]. (Can be faster to turn this off if you don't need it.) Initialized to @racket[#t].}
@defparam[world:current-module-root dir path? @defthing[world:server-extras-dir dir string? #:value "server-extras"]
#:value #f]{ Name of directory where server support files live.
A parameter that reports the path to the Pollen module. Initialized to @racket[#f], but set to a proper value when @racketmodname[pollen/server] runs.}
@defparam[world:current-server-extras-path dir path? @defparam[world:current-server-extras-path dir path?
#:value #f]{ #:value #f]{

@ -1,5 +1,7 @@
#lang web-server #lang web-server/base
(require web-server/servlet-env
(require racket/list racket/contract
web-server/servlet-env
web-server/dispatch) web-server/dispatch)
(require "server-routes.rkt" (require "server-routes.rkt"
"debug.rkt" "debug.rkt"
@ -28,12 +30,10 @@
(message "Ready to rock") (message "Ready to rock")
(world:current-module-root (apply build-path (drop-right (explode-path (current-contract-region)) 1))) (define module-root (apply build-path (drop-right (explode-path (current-contract-region)) 1)))
(world:current-server-extras-path (build-path (world:current-module-root) "server-extras")) (world:current-server-extras-path (build-path module-root world:server-extras-dir))
(parameterize ([world:current-module-root (world:current-module-root)] (parameterize ([error-print-width 1000]
[world:current-server-extras-path (world:current-server-extras-path)]
[error-print-width 1000]
[current-cache (make-cache)]) [current-cache (make-cache)])
(serve/servlet pollen-servlet (serve/servlet pollen-servlet
#:port (world:current-server-port) #:port (world:current-server-port)

@ -49,7 +49,7 @@
(define dashboard-css "poldash.css") (define dashboard-css "poldash.css")
(define current-module-root (make-parameter #f)) (define server-extras-dir "server-extras")
(define current-server-extras-path (make-parameter #f)) (define current-server-extras-path (make-parameter #f))
(define check-project-requires-in-render? (make-parameter #t)) (define check-project-requires-in-render? (make-parameter #t))

Loading…
Cancel
Save