17 lines
432 B
Go
17 lines
432 B
Go
package server
|
|
|
|
import (
|
|
"net/http"
|
|
"up/api"
|
|
)
|
|
|
|
func Configure() {
|
|
http.Handle("/", api.SpaHandler(http.FS(api.Frontend)))
|
|
http.HandleFunc("/api/mount", api.MountStatus)
|
|
http.HandleFunc("/api/extlinux", api.Extlinux)
|
|
http.HandleFunc("/api/filedate", api.FileDate)
|
|
http.HandleFunc("/api/temperature", api.HandleTemperature)
|
|
http.HandleFunc("/api/upload", api.HandleUpload)
|
|
http.HandleFunc("/api/reboot", api.HandleReboot)
|
|
}
|