From 90d401e98e1f396a42321c4eb7bddf92fba872c8 Mon Sep 17 00:00:00 2001 From: Las Zenow Date: Fri, 31 Aug 2012 00:35:39 +0200 Subject: [PATCH] Make the port configurable --- config.go | 1 + trantor.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config.go b/config.go index 83553fc..912165d 100644 --- a/config.go +++ b/config.go @@ -1,6 +1,7 @@ package main const ( + PORT = ":8080" DB_IP = "127.0.0.1" DB_NAME = "trantor" BOOKS_COLL = "books" diff --git a/trantor.go b/trantor.go index 8bb05cf..35a9558 100644 --- a/trantor.go +++ b/trantor.go @@ -154,5 +154,5 @@ func main() { fileHandler("/css/") fileHandler("/js/") http.HandleFunc("/", indexHandler(coll)) - http.ListenAndServe(":8080", nil) + http.ListenAndServe(PORT, nil) }