summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix-web/config.scm5
-rw-r--r--guix-web/render.scm2
-rw-r--r--guix-web/server.scm2
3 files changed, 6 insertions, 3 deletions
diff --git a/guix-web/config.scm b/guix-web/config.scm
index 4c2220d..5de3dea 100644
--- a/guix-web/config.scm
+++ b/guix-web/config.scm
@@ -17,7 +17,8 @@
(define-module (guix-web config)
#:use-module (ice-9 match)
- #:use-module (guix-web server)
- #:export (guix-web-asset-dir))
+ #:export (guix-web-asset-dir
+ guix-web-port))
(define guix-web-asset-dir (getcwd))
+(define guix-web-port 8080)
diff --git a/guix-web/render.scm b/guix-web/render.scm
index 024bcf7..835585f 100644
--- a/guix-web/render.scm
+++ b/guix-web/render.scm
@@ -20,6 +20,7 @@
#:use-module (web uri)
#:use-module (sxml simple)
#:use-module (json)
+ #:use-module (guix-web config)
#:export (render-html
render-json
not-found
@@ -53,6 +54,7 @@
(define (redirect path)
(let ((uri (build-uri 'http
#:host "localhost"
+ #:port guix-web-port
#:path (string-append
"/" (encode-and-join-uri-path path)))))
(list (build-response
diff --git a/guix-web/server.scm b/guix-web/server.scm
index af9f9dc..25f92f5 100644
--- a/guix-web/server.scm
+++ b/guix-web/server.scm
@@ -64,5 +64,5 @@
(run-server (lambda args (apply handler args))
'http
`(#:addr ,INADDR_ANY
- #:port 8080)
+ #:port ,guix-web-port)
controller))