Browse Source

static file handler

master
SeraphJACK 3 years ago
parent
commit
308d643d3e
Signed by: SeraphJACK <seraphjack@outlook.com> GPG Key ID: 14162B46567AB06F
2 changed files with 2 additions and 9 deletions
  1. +2
    -2
      http/server.go
  2. +0
    -7
      http/static.go

+ 2
- 2
http/server.go View File

@@ -11,12 +11,12 @@ func Start(listen string) error {

router.HandleFunc("/challenge", tellChallenge)
router.HandleFunc("/submit", handleSubmit)
router.HandleFunc("/", handleStatic)
router.Handle("/", http.FileServer(http.Dir("static")))

err := http.ListenAndServe(listen, router)

if err != nil {
log.Println("HTTP server listening on ", listen)
}

return err
}

+ 0
- 7
http/static.go View File

@@ -1,7 +0,0 @@
package http

import "net/http"

func handleStatic(w http.ResponseWriter, r *http.Request) {
// TODO
}

Loading…
Cancel
Save