Add static serving
This commit is contained in:
@@ -9,9 +9,10 @@ func StartServer() {
|
||||
// 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)
|
||||
http.HandleFunc("/", rootHandler)
|
||||
|
||||
http.HandleFunc("/help", helpTemplate) // Rendered with props passed in
|
||||
|
||||
http.HandleFunc("/generate", generateBarcode)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user