You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Breaking: Return an object containing httpServer from runServer API
Summary:
Currently the `runServer` API simply returns the Node.js `HttpServer` (or `HttpsServer`) instance it creates.
Because that's not a type we control, we can't extend this API - for example, it can't expose an imperative `end()`, or anything about the Metro server. We've come up against this limitation with this specific API in the past.
Since we're about to release a major version with other breaking changes, this takes the opportunity to change the return type to `Promise<{httpServer: HttpServer | HttpsServer}>`, thereby making it extensible in subsequent non-breaking changes.
Changelog:
```
- **[Breaking]**: Metro.runServer - return an object containing `httpServer` rather than the server instance directly
Reviewed By: huntie
Differential Revision: D78099715
fbshipit-source-id: 1aae46cc73a4b9901ef1b9cbffdab66b6d04fd72
0 commit comments