1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-11 18:32:50 +00:00
This commit is contained in:
2016-08-30 02:45:56 +00:00
parent 7c350be5b7
commit 97598ba7e8
8 changed files with 29 additions and 16 deletions

View File

@@ -4,7 +4,8 @@ import (
"log"
"net/http"
"strconv"
"github.com/NYTimes/gziphandler"
//local import paths relative to app.yaml file
"mywebsite/server/controller/api"
"mywebsite/server/db"
@@ -34,7 +35,10 @@ func main(){
api.Configure(configurations.Api)
db.Mongo.Connect()
//register middleware
handle := gziphandler.GzipHandler(route.Routes())
log.Println("Starting Server...")
log.Println(http.ListenAndServe(":"+strconv.Itoa(configurations.Port), route.Routes()))
log.Println(http.ListenAndServe(":"+strconv.Itoa(configurations.Port), handle))
}