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