{{set . "title" "Basic Chat room"}} {{template "header.html" .}}

Ajax, using active refresh — You are now chatting as {{.user}} Leave the chat room

{{range .events}} {{if eq .Type "message"}}

{{.User}}

{{.Text}}

{{end}} {{if eq .Type "join"}}

{{.User}} joined the room

{{end}} {{if eq .Type "leave"}}

{{.User}} left the room

{{end}} {{end}}
{{template "footer.html" .}}