func putEditorHandler(writer http.ResponseWriter, request *http.Request) {
	editorWrapper := data.EditorWrapper{}
	vars := mux.Vars(request)
	fileType := vars["fileType"]
	fileName := vars["fileName"]
	filePath := "dalek/" + fileType + "/" + fileName
	err := request.ParseForm()
	if check(err, 500, &writer) {
		return
	}
	err = request.ParseMultipartForm(32 << 20)
	if check(err, 500, &writer) {
		return
	}
	config.DebugLog("Request for: ", filePath)
	file, _, err := request.FormFile("file")
	if check(err, 500, &writer) {
		return
	}
	defer file.Close()
	buf := new(bytes.Buffer)
	_, err = buf.ReadFrom(file)
	if check(err, 500, &writer) {
		return
	}
	editorWrapper.FileContent = string(buf.Bytes())
	serveTemplate(writer, request, path.Join(manifest.Server.WebRoot, "dynamic", "editor.html"), editorWrapper)
}
func editorHandler(writer http.ResponseWriter, request *http.Request) {
	config.DebugLog("Request for: "+request.Method+" \"", request.URL.Path, "\"")
	var editorWrapper data.EditorWrapper
	ip, err := getMqttHost()
	if check(err, 500, &writer) {
		return
	}
	editorWrapper.ServerIP = ip
	editorWrapper.MqttPort = manifest.Server.MqttPort
	vars := mux.Vars(request)
	fileType := vars["fileType"]
	fileName := vars["fileName"]
	filePath := "dalek/" + fileType + "/" + fileName
	if _, err := os.Stat(filePath); !os.IsNotExist(err) {
		config.DebugLog("Loading file into editor: ", filePath)
		content, err := ioutil.ReadFile(filePath)
		if check(err, 500, &writer) {
			return
		}
		editorWrapper.FileContent = string(content)
	}
	serveTemplate(writer, request, path.Join(manifest.Server.WebRoot, "dynamic", "editor.html"), editorWrapper)
}