Adds config file (quanlib.ini) support.
[quanweb.git] / main / main.go
1 package main
2
3 import (
4   "database/sql"
5   "net/http"
6   "strconv"
7 )
8
9 // ============================================================================
10 func main() {
11   defer dbShutdown()
12
13   var b sql.NullString
14   nsVal(b)
15
16   fs := http.FileServer(http.Dir("../app"))
17   http.Handle("/app/", http.StripPrefix("/app", fs))
18
19   http.HandleFunc("/", handler)
20
21   config := GetConfig()
22   http.ListenAndServe(":" + strconv.Itoa(config.port), nil)
23 }