async function queryEventsHandler(res, serverId) {
  try {
    const entries = await database.query(serverId);
    res.setHeader('Content-Type', 'application/json');
    res.statusCode = 200;
    res.write(JSON.stringify({entries}));
    res.end();
  } catch {
    res.statusCode = 401;
    res.end();
  }
}
Handler for an events GET request. Query the database for events since the
last serverId and return them in the HTTP response.
@param {!Object} res The HTTP response object.
@param {number} serverId serverId for the lower bound of the query.
@private