mirror of
https://github.com/jesperh1/forkort.dk.git
synced 2025-05-16 17:28:09 +01:00
Added port to config file
This commit is contained in:
parent
4c50448a9a
commit
e92fbc20ef
@ -1,4 +1,5 @@
|
||||
MYSQL_DB = "forkort"
|
||||
MYSQL_USER = "forkort"
|
||||
MYSQL_PASS = "Passw0rd"
|
||||
MYSQL_HOST = "127.0.0.1:3306"
|
||||
MYSQL_HOST = "127.0.0.1:3306"
|
||||
PORT = ":8080"
|
3
main.go
3
main.go
@ -194,6 +194,7 @@ type Config struct {
|
||||
MYSQL_USER string
|
||||
MYSQL_PASS string
|
||||
MYSQL_HOST string
|
||||
PORT string
|
||||
}
|
||||
|
||||
func main() {
|
||||
@ -227,5 +228,5 @@ func main() {
|
||||
router.HandleFunc(`/{token}`, UnshortenHandler)
|
||||
router.PathPrefix("/static/").Handler(http.StripPrefix("/static", http.FileServer(http.Dir("./assets"))))
|
||||
|
||||
http.ListenAndServe(":8080", router)
|
||||
http.ListenAndServe(cfg.PORT, router)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user