Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Expose mux router on initialize #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ramarahmanda
Copy link

Description

Exposing mux router so that wen can extend middleware in server

Sample usage

middleware := func(h http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		log.Println("middleware", r.URL)
		h.ServeHTTP(w, r)
	})
}
r := bookstore.Initialize(NewService())
r.Use(middleware)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant