mirror of https://github.com/status-im/fathom.git
add logging handler for all req's
This commit is contained in:
parent
5f3e22665b
commit
2ff06c02d0
9
ana.go
9
ana.go
|
@ -2,10 +2,11 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"os"
|
||||||
"github.com/dannyvankooten/ana/core"
|
"github.com/dannyvankooten/ana/core"
|
||||||
"github.com/dannyvankooten/ana/api"
|
"github.com/dannyvankooten/ana/api"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
"github.com/gorilla/handlers"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO: Authentication.
|
// TODO: Authentication.
|
||||||
|
@ -25,9 +26,5 @@ func main() {
|
||||||
r.PathPrefix("/static/").Handler(http.StripPrefix("/static/", http.FileServer(http.Dir("./static/"))))
|
r.PathPrefix("/static/").Handler(http.StripPrefix("/static/", http.FileServer(http.Dir("./static/"))))
|
||||||
r.Handle("/", http.FileServer(http.Dir("./views/")))
|
r.Handle("/", http.FileServer(http.Dir("./views/")))
|
||||||
|
|
||||||
// r.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
http.ListenAndServe(":8080", handlers.LoggingHandler(os.Stdout, r))
|
||||||
// http.ServeFile(w, r, "./static/" + r.URL.Path[1:])
|
|
||||||
// })
|
|
||||||
|
|
||||||
http.ListenAndServe(":8080", r)
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue