Update web handling
This commit is contained in:
@@ -6,9 +6,10 @@ import (
|
||||
)
|
||||
|
||||
func StartServer() {
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
fmt.Fprintf(w, "Barcodes")
|
||||
})
|
||||
// What I want to do here is server from /static
|
||||
// if the resource exists, else try to render from /templates
|
||||
// if the template exists. Else return 404.
|
||||
http.HandleFunc("/", mainHandler)
|
||||
|
||||
http.HandleFunc("/help", helpTemplate)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user