async function createServer() {
  const {app} = await createApp();

  return new Promise(resolve => {
    const server = createHttpServer(app);
    server.listen(0, () => {
      const serverAddress = server.address();
      const listenPort =
        typeof serverAddress === 'string' || !serverAddress ? 0 : serverAddress.port;

      resolve({
        port: listenPort,
        close: async () => {
          await new Promise(r => server.close(r));
        },
      });
    });
  });
}
@return {Promise<{port: number, close: () => Promise<void>}>}