-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhttphandlersdev.go
More file actions
52 lines (39 loc) · 1.65 KB
/
httphandlersdev.go
File metadata and controls
52 lines (39 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// +build debug
package main
import (
"fmt"
"net/http"
)
func handlerMainJsBundle(w http.ResponseWriter, r *http.Request) {
handleFileRequest(w, fmt.Sprintf("./react/static/js/main-bundle-%s.js", AppVersion), "text/javascript")
}
func handlerVendorsJsBundle(w http.ResponseWriter, r *http.Request) {
handleFileRequest(w, fmt.Sprintf("./react/static/js/vendors-bundle-%s.js", AppVersion), "text/javascript")
}
func handlerEditorWorkerJS(w http.ResponseWriter, r *http.Request) {
handleFileRequest(w, "./react/static/js/editor.worker.js", "text/javascript")
}
func handlerMonacoFontTTF(w http.ResponseWriter, r *http.Request) {
handleFileRequest(w, "./react/static/fonts/monaco-font.ttf", "font/ttf")
}
func handlerThingsdbGIF(w http.ResponseWriter, r *http.Request) {
handleFileRequest(w, "./react/static/img/thingsdb.gif", "image/gif")
}
func handlerThingsguiLogo(w http.ResponseWriter, r *http.Request) {
handleFileRequest(w, "./react/static/img/thingsgui-logo.png", "image/png")
}
func handlerThingsdbLogo(w http.ResponseWriter, r *http.Request) {
handleFileRequest(w, "./react/static/img/thingsdb-logo.png", "image/png")
}
func handlerCesbitLogo(w http.ResponseWriter, r *http.Request) {
handleFileRequest(w, "./react/static/img/CesbitLogo.png", "image/png")
}
func handlerViewEditLogo(w http.ResponseWriter, r *http.Request) {
handleFileRequest(w, "./react/static/img/view-edit.png", "image/png")
}
func handlerFaviconIco(w http.ResponseWriter, r *http.Request) {
handleFileRequest(w, "./react/static/favicon.ico", "image/x-icon")
}
func handlerMain(w http.ResponseWriter, r *http.Request) {
handleFileRequest(w, "./react/templates/app.html", "text/html")
}