Skip to content

Commit

Permalink
Command line port spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
samth committed Oct 19, 2012
1 parent 8c6eb17 commit aff7deb
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions main.rkt
Expand Up @@ -196,11 +196,19 @@
[("paste" (string-arg)) show-paste]
[("fork" (string-arg)) main-page]))

(serve/servlet dispatch
#:port 80
#:launch-browser? #f
#:listen-ip #f
#:extra-files-paths (list static)
#:servlet-regexp #rx""
#:servlet-path ""
#:log-file "paste_rkt.log")
(define (go [p 80])
(serve/servlet dispatch
#:port p
#:launch-browser? #f
#:listen-ip #f
#:extra-files-paths (list static)
#:servlet-regexp #rx""
#:servlet-path ""
#:log-file "paste_rkt.log"))

(module+ main
(require racket/cmdline)
(command-line #:program "paste.rkt"
#:args (p)
(go (string->number p))))

0 comments on commit aff7deb

Please sign in to comment.