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
|
||||
|
||||
const (
|
||||
PORT = ":8080"
|
||||
DB_IP = "127.0.0.1"
|
||||
DB_NAME = "trantor"
|
||||
BOOKS_COLL = "books"
|
||||
|
|
|
@ -154,5 +154,5 @@ func main() {
|
|||
fileHandler("/css/")
|
||||
fileHandler("/js/")
|
||||
http.HandleFunc("/", indexHandler(coll))
|
||||
http.ListenAndServe(":8080", nil)
|
||||
http.ListenAndServe(PORT, nil)
|
||||
}
|
||||
|
|
Reference in a new issue