~nromdotcom/gemif

d1d393adc836ab7c3055ee883de8fb3cc90e6f41 — Norm MacLennan 1 year, 2 days ago d2fe84d
Add emoji favicon
2 files changed, 5 insertions(+), 0 deletions(-)

M pkg/gemserver/router.go
M pkg/gemserver/routes.go
M pkg/gemserver/router.go => pkg/gemserver/router.go +1 -0
@@ 34,6 34,7 @@ func StartRouter(gm *gamemanager.GameManager, gc ServerConfig) {
	g.Handle("/game/:statetoken", handleGame(gm, sceneRenderer))
	g.Handle("/docs*", handleStatic)
	g.Handle("/robots.txt", handleRobots)
	g.Handle("/favicon.txt", handleFavicon)

	panic(g.Run(fmt.Sprintf(":%d", gc.Port), gc.CertFile, gc.KeyFile))
}

M pkg/gemserver/routes.go => pkg/gemserver/routes.go +4 -0
@@ 94,3 94,7 @@ func handleRobots(c gig.Context) error {
	return c.Text(`User-agent: *
Disallow: /game/`)
}

func handleFavicon(c gig.Context) error {
	return c.Text("📚")
}