2016-12-18 22:54:21 +01:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
"net/http"
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
port := os.Getenv("PORT")
|
|
|
|
if len(port) == 0 {
|
|
|
|
port = "8080"
|
|
|
|
}
|
|
|
|
|
2016-12-20 19:47:36 +01:00
|
|
|
router := NewRouter()
|
2016-12-18 22:54:21 +01:00
|
|
|
|
2016-12-20 19:47:36 +01:00
|
|
|
log.Fatal(http.ListenAndServe(":"+port, router))
|
2016-12-18 22:54:21 +01:00
|
|
|
}
|