-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathmain.go
More file actions
38 lines (32 loc) · 823 Bytes
/
main.go
File metadata and controls
38 lines (32 loc) · 823 Bytes
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
package main
import (
"fmt"
"net/http"
"github.com/os-vector/wired/mods"
"github.com/os-vector/wired/vars"
)
var EnabledMods []vars.Modification = []vars.Modification{
mods.NewFreqChange(),
mods.NewWakeWordPV(),
mods.NewAutoUpdate(),
mods.NewSensitivityPV(),
mods.NewJdocSettings(),
mods.NewFaces(),
}
func main() {
vars.EnabledMods = EnabledMods
vars.InitMods()
startweb()
}
func startweb() {
fmt.Println("starting web at port 8080")
fs := http.FileServer(http.Dir("/etc/wired/webroot"))
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
// no mno non o caching
w.Header().Set("Cache-Control", "no-store, no-cache, must-revalidate, max-age=0")
w.Header().Set("Pragma", "no-cache")
w.Header().Set("Expires", "0")
fs.ServeHTTP(w, r)
})
http.ListenAndServe(":8080", nil)
}