Skip to content
Snippets Groups Projects
Commit 6d8ec55a authored by Abdulsamad Sheikh's avatar Abdulsamad Sheikh :cat2:
Browse files

Upload New File

parent 5664df71
Branches
No related tags found
No related merge requests found
main.go 0 → 100644
package main
import (
"net/http"
"assignment1/handlers"
"time"
)
func main() {
mux := http.NewServeMux()
mux.HandleFunc("/librarystats/v1/bookcount/", handlers.BookCountHandler)
mux.HandleFunc("/librarystats/v1/readership/", handlers.ReadershipHandler)
mux.HandleFunc("/librarystats/v1/status/", handlers.StatusHandler)
srv := &http.Server{
Handler: mux,
Addr: "127.0.0.1:8080",
WriteTimeout: 15 * time.Second,
ReadTimeout: 15 * time.Second,
}
http.ListenAndServe(":8080", mux)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment