websocket
websocket copied to clipboard
Use embeds for home files in chat examples
Rather than serving up the html files directly from whatever directory the program is run in, embed the files in the binary.
What type of PR is this? (check all applicable)
- [ ] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Optimization
- [X] Documentation Update
- [ ] Go Version Update
- [ ] Dependency Update
Description
Added/updated tests?
- [X] No, and this is why: Just example code
Run verifications and test
- [X] I don't see any makefiles?
- [ ]
make verifyis passing - [ ]
make testis passing
IDK IDK. It's pretty common for web servers to serve files instead of embedding them in the binary. This IMO complicates the example without a practical benefit.
Benefits of this change are:
- the
cdstep for running the example can be deleted. - the example can be
go installed. - the example will follow current best practices for accessing static assets.