projects
/
quanweb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adds config file (quanlib.ini) support.
[quanweb.git]
/
main
/
main.go
diff --git
a/main/main.go
b/main/main.go
index 99c09a08abf0b1c88a77efe08e3fa4c221e15edf..b54712f7efaf7fbb0ffc80a4893527614cc61bc4 100644
(file)
--- a/
main/main.go
+++ b/
main/main.go
@@
-3,6
+3,7
@@
package main
import (
"database/sql"
"net/http"
import (
"database/sql"
"net/http"
+ "strconv"
)
// ============================================================================
)
// ============================================================================
@@
-12,6
+13,11
@@
func main() {
var b sql.NullString
nsVal(b)
var b sql.NullString
nsVal(b)
+ fs := http.FileServer(http.Dir("../app"))
+ http.Handle("/app/", http.StripPrefix("/app", fs))
+
http.HandleFunc("/", handler)
http.HandleFunc("/", handler)
- http.ListenAndServe(":8001", nil)
+
+ config := GetConfig()
+ http.ListenAndServe(":" + strconv.Itoa(config.port), nil)
}
}