parameterizing the port
This commit is contained in:
parent
04f0aec996
commit
511c3a0c20
|
@ -1,7 +1,5 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(require "repl-compile.rkt"
|
(require "repl-compile.rkt"
|
||||||
json
|
json
|
||||||
file/gzip
|
file/gzip
|
||||||
|
@ -9,6 +7,7 @@
|
||||||
racket/port
|
racket/port
|
||||||
racket/match
|
racket/match
|
||||||
racket/pretty
|
racket/pretty
|
||||||
|
racket/cmdline
|
||||||
web-server/servlet-env
|
web-server/servlet-env
|
||||||
web-server/servlet
|
web-server/servlet
|
||||||
"../make/make-structs.rkt"
|
"../make/make-structs.rkt"
|
||||||
|
@ -103,9 +102,16 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(define current-port (make-parameter 8080))
|
||||||
|
(void (command-line
|
||||||
|
#:once-each
|
||||||
|
[("-p" "--port") p "Port (default 8080)"
|
||||||
|
(current-port (string->number p))]))
|
||||||
|
|
||||||
|
|
||||||
(write-repl-runtime-files)
|
(write-repl-runtime-files)
|
||||||
(serve/servlet start
|
(serve/servlet start
|
||||||
#:servlet-path "/compile"
|
#:servlet-path "/compile"
|
||||||
#:extra-files-paths (list htdocs)
|
#:extra-files-paths (list htdocs)
|
||||||
#:launch-browser? #f
|
#:launch-browser? #f
|
||||||
#:port 8080)
|
#:port (current-port))
|
Loading…
Reference in New Issue
Block a user