https://github.com/joeriddles/much-ado-about-muxing
`net/http` had a glow up... and its name is `ServeMux`
https://github.com/joeriddles/much-ado-about-muxing
go wasm
Last synced: 2 months ago
JSON representation
`net/http` had a glow up... and its name is `ServeMux`
- Host: GitHub
- URL: https://github.com/joeriddles/much-ado-about-muxing
- Owner: joeriddles
- Created: 2024-09-17T05:43:02.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-17T22:19:13.000Z (almost 2 years ago)
- Last Synced: 2025-10-28T05:50:00.093Z (8 months ago)
- Topics: go, wasm
- Language: HTML
- Homepage: https://joeriddles.github.io/much-ado-about-muxing/
- Size: 8.41 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Much Ado About Muxing
`net/http` had a glow up... and its name is `ServeMux`.
Is it time to kick Chi, Echo, and Gin to the curb? It just might be.
Go 1.22 came out recently and added some much needed improvements to the standard library's HTTP request multiplexer (mux). We'll explore these new additions and help you figure out if it's time to return to sweet, stdlib goodness for your HTTP 'plexing needs.
_A presentation for the Spokane Go User Group: https://www.meetup.com/spokane-go-users-group/events/303409967/._
### Development
Run local web server:
```shell
$ make serve
```
Build Go WASM:
```shell
$ make build
```
Udpate `examples.js`:
```shell
$ make examples
```
Update slides:
```shell
$ make slides
```
### Resources
- [`ServeMux` docs](https://pkg.go.dev/net/http#ServeMux)
- [net/http: enhanced ServeMux routing #61410](https://github.com/golang/go/issues/61410), released in 1.22
- [net/http: add methods and path variables to ServeMux patterns #60227](https://github.com/golang/go/discussions/60227)
- [net/http: expose matched pattern in Request #66405](https://github.com/golang/go/issues/66405), released in 1.23.1
- [Different approaches to HTTP routing in Go](https://benhoyt.com/writings/go-routing/)
- [Notes on running Go in the browser with WebAssembly](https://eli.thegreenplace.net/2024/notes-on-running-go-in-the-browser-with-webassembly/)