Files
play-with-docker/handlers/home.go
Jonathan Leibiusky @xetorthio 1634200ef7 UI modifications for stack creation
2017-05-16 17:37:34 -03:00

20 lines
357 B
Go

package handlers
import (
"net/http"
"github.com/gorilla/mux"
"github.com/play-with-docker/play-with-docker/services"
)
func Home(w http.ResponseWriter, r *http.Request) {
vars := mux.Vars(r)
sessionId := vars["sessionId"]
s := services.GetSession(sessionId)
if s.Stack != "" {
go s.DeployStack()
}
http.ServeFile(w, r, "./www/index.html")
}