From 41e2daf3e9ddb7778852c845408d3dc64b408cd7 Mon Sep 17 00:00:00 2001 From: zhanshi Date: Sat, 8 Feb 2025 10:04:44 +0100 Subject: [PATCH] Changed port - TODO set this with a config file --- main.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 54d9ac1..8b5683c 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "html/template" "log" "net/http" @@ -12,12 +13,12 @@ import ( ) const ( + PORT = 61594 + FILES_DIR = "files" TEMPLATES_DIR = "templates" TIME_FORMAT = "Jan 2 2006 15:04:05" -) -const ( POST_ICON = "/static/post.gif" FILE_ICON = "/static/file.gif" ) @@ -167,6 +168,6 @@ func main() { }) - log.Println("Serving on :8080") - http.ListenAndServe(":8080", nil) + log.Println("Serving on :", PORT) + http.ListenAndServe(fmt.Sprintf(":%d", PORT), nil) } \ No newline at end of file