Skip to content

Commit

Permalink
Merge pull request #9 from wawandco/small-fix-readme
Browse files Browse the repository at this point in the history
Small fix: readme
  • Loading branch information
paganotoni authored Jun 20, 2024
2 parents e330737 + 799425e commit 15b1d5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ auth := maildoor.New(
})

mux := http.NewServeMux()
mux.Handle("/auth", auth)
mux.Handle("/", auth)
mux.Handle("/private", secure(privateHandler))
http.ListenAndServe(":8080", mux)
```

Then, go to `http://localhost:8080/auth/login` to see the login page.

## Features

- Pluggable http.Handler that can be used with any go http server
Expand Down
2 changes: 1 addition & 1 deletion internal/sample/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func main() {
r := http.NewServeMux()

// Auth handlers
r.Handle("/auth/", sample.Auth)
r.Handle("/", sample.Auth)

// Application handlers
r.HandleFunc("/private", sample.Private)
Expand Down

0 comments on commit 15b1d5e

Please sign in to comment.