Make the port configurable
This commit is contained in:
parent
ade035eb00
commit
90d401e98e
2 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
PORT = ":8080"
|
||||||
DB_IP = "127.0.0.1"
|
DB_IP = "127.0.0.1"
|
||||||
DB_NAME = "trantor"
|
DB_NAME = "trantor"
|
||||||
BOOKS_COLL = "books"
|
BOOKS_COLL = "books"
|
||||||
|
|
|
@ -154,5 +154,5 @@ func main() {
|
||||||
fileHandler("/css/")
|
fileHandler("/css/")
|
||||||
fileHandler("/js/")
|
fileHandler("/js/")
|
||||||
http.HandleFunc("/", indexHandler(coll))
|
http.HandleFunc("/", indexHandler(coll))
|
||||||
http.ListenAndServe(":8080", nil)
|
http.ListenAndServe(PORT, nil)
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue