using runtime-path
svn: r13328
This commit is contained in:
parent
778f5f985c
commit
8d0a19bd80
|
@ -1,8 +1,7 @@
|
|||
#lang scheme/base
|
||||
(require mzlib/contract
|
||||
mzlib/list
|
||||
mzlib/pretty)
|
||||
(require "configuration-table-structs.ss"
|
||||
#lang scheme
|
||||
(require scheme/pretty
|
||||
scheme/runtime-path
|
||||
"configuration-table-structs.ss"
|
||||
web-server/http/bindings)
|
||||
(define configuration-table-sexpr? list?)
|
||||
|
||||
|
@ -14,8 +13,9 @@
|
|||
[sexpr->configuration-table (configuration-table-sexpr? . -> . configuration-table?)]
|
||||
[default-configuration-table-path path?])
|
||||
|
||||
(define default-configuration-table-path
|
||||
(build-path (collection-path "web-server") "default-web-root" "configuration-table.ss"))
|
||||
(define-runtime-path default-configuration-table-path
|
||||
(list 'lib
|
||||
"web-server/default-web-root/configuration-table.ss"))
|
||||
|
||||
(define (get-binding key bindings default)
|
||||
(first (get-binding* key bindings (list default))))
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#lang scheme/base
|
||||
(require mzlib/list
|
||||
scheme/contract)
|
||||
#lang scheme
|
||||
|
||||
(define default-to-be-copied-module-specs '(mzscheme mred))
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#lang scheme
|
||||
;; Written by Don Felgar, edited by Greg Pettyjohn
|
||||
;;
|
||||
;; Multiple-choice quiz PLT servlet sample.
|
||||
|
@ -11,11 +12,11 @@
|
|||
;; choices = (listof string), possible answers to the question
|
||||
;; correct-answer = integer, index into choices
|
||||
;;
|
||||
#lang scheme/base
|
||||
;; Configuration
|
||||
(define *data-file*
|
||||
(build-path (collection-path "web-server")
|
||||
"default-web-root" "htdocs" "servlets" "examples" "english-measure-questions.ss"))
|
||||
(require scheme/runtime-path)
|
||||
(define-runtime-path *data-file*
|
||||
(list 'lib
|
||||
"web-server/default-web-root/htdocs/servlets/examples/english-measure-questions.ss"))
|
||||
(define *questions-per-quiz* 5)
|
||||
|
||||
(require web-server/servlet
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
; Derived from plai/web/server, which was based on an older version of this
|
||||
; Also derived from planet/untyped/instaservlet
|
||||
#lang scheme/base
|
||||
#lang scheme
|
||||
(require (prefix-in net: net/sendurl)
|
||||
scheme/contract
|
||||
scheme/list
|
||||
|
|
Loading…
Reference in New Issue
Block a user