mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
add logs for the http server
This commit is contained in:
parent
d24335048a
commit
f90fa8275b
1 changed files with 3 additions and 1 deletions
|
|
@ -12,5 +12,7 @@ import (
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
router := NewRouter()
|
router := NewRouter()
|
||||||
log.Fatal(http.ListenAndServe(":8080", handlers.CORS(handlers.AllowedHeaders([]string{"X-Requested-With", "Content-Type", "Authorization"}), handlers.AllowedMethods([]string{"GET", "POST", "PUT", "HEAD", "OPTIONS"}), handlers.AllowedOrigins([]string{"*"}))(router)))
|
port := "8080"
|
||||||
|
log.Printf("Listening on port " + " " + port)
|
||||||
|
log.Fatal(http.ListenAndServe(":"+port, handlers.CORS(handlers.AllowedHeaders([]string{"X-Requested-With", "Content-Type", "Authorization"}), handlers.AllowedMethods([]string{"GET", "POST", "PUT", "HEAD", "OPTIONS"}), handlers.AllowedOrigins([]string{"*"}))(router)))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue