Update support for events.

nit: this can be a single line: const eventBase = "/events"