X-Git-Url: http://jaekl.net/gitweb/?p=quanweb.git;a=blobdiff_plain;f=main%2Fmain.go;h=b54712f7efaf7fbb0ffc80a4893527614cc61bc4;hp=99c09a08abf0b1c88a77efe08e3fa4c221e15edf;hb=e2b95cefd1e34e652317fdf82595932c0bf0c6bb;hpb=d4b5c2903e7b0c2267aa7bfdef514a3d1e447de3 diff --git a/main/main.go b/main/main.go index 99c09a0..b54712f 100644 --- a/main/main.go +++ b/main/main.go @@ -3,6 +3,7 @@ package main import ( "database/sql" "net/http" + "strconv" ) // ============================================================================ @@ -12,6 +13,11 @@ func main() { var b sql.NullString nsVal(b) + fs := http.FileServer(http.Dir("../app")) + http.Handle("/app/", http.StripPrefix("/app", fs)) + http.HandleFunc("/", handler) - http.ListenAndServe(":8001", nil) + + config := GetConfig() + http.ListenAndServe(":" + strconv.Itoa(config.port), nil) }