async function getSnapshotHandler(res) {
  try {
    const snapshot = await database.getSnapshot();
    res.setHeader('Content-Type', 'application/json');
    res.statusCode = 200;
    res.write(JSON.stringify({snapshot}));
    res.end();
  } catch {
    res.statusCode = 401;
    res.end();
  }
}
Handler for a snapshot GET request. Get the latest snapshot of the
workspace.
@param {!Object} res The HTTP response object.
@public