mirror of
https://github.com/Unkn0wnCat/matrix-veles.git
synced 2025-05-25 23:06:28 +02:00
Add webui to binary package
This commit is contained in:
parent
52b426cb6a
commit
e0965b92e2
6 changed files with 141 additions and 4 deletions
20
webui/webuiNotIncluded.go
Normal file
20
webui/webuiNotIncluded.go
Normal file
|
@ -0,0 +1,20 @@
|
|||
//go:build !withUI
|
||||
// +build !withUI
|
||||
|
||||
package webui
|
||||
|
||||
//go:generate yarn
|
||||
//go:generate yarn build
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func ServeUI() (http.Handler, error) {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.WriteHeader(404)
|
||||
w.Write([]byte("{\"error_code\": 404, \"error\": \"not_found\", \"note\": \"WebUI not included in build - visit https://veles.1in1.net/docs/tutorial-basics/install\"}"))
|
||||
return
|
||||
}), nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue