fix(server): the server API provides an onstart callback