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

@ -232,7 +232,8 @@
pollen/world
pollen/project-requires
sugar
txexpr)
txexpr
hyphenate)
(define-namespace-anchor my-module-cache-ns-anchor)
(provide my-module-cache-ns-anchor))
@ -267,5 +268,6 @@
pollen/template
pollen/world
sugar
txexpr))
txexpr
hyphenate))
(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]{
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?
#:value #f]{
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.}
@defthing[world:server-extras-dir dir string? #:value "server-extras"]
Name of directory where server support files live.
@defparam[world:current-server-extras-path dir path?
#:value #f]{

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

@ -49,7 +49,7 @@
(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 check-project-requires-in-render? (make-parameter #t))

Loading…
Cancel
Save