Base class for all Fastify-based servers. It handles creation of a Fastify instance, creation of all WebSocket servers and running Fastify.
BaseDevServer
• new BaseDevServer(config
, loggerOptions?
)
Constructs new BaseDevServer
instance.
Name | Type | Description |
---|---|---|
config |
BaseDevServerConfig |
Configuration options. |
loggerOptions? |
DevServerLoggerOptions |
Logger options. |
packages/repack/src/server/BaseDevServer.ts:56
• Protected
config: BaseDevServerConfig
Configuration options.
packages/repack/src/server/BaseDevServer.ts:35
• fastify: FastifyDevServer
Fastify instance.
packages/repack/src/server/BaseDevServer.ts:38
• wsClientServer: WebSocketDevClientServer
Server instance for React Native clients.
packages/repack/src/server/BaseDevServer.ts:48
• wsDebuggerServer: WebSocketDebuggerServer
Debugger server instance.
packages/repack/src/server/BaseDevServer.ts:42
• wsEventsServer: WebSocketEventsServer
Events server instance.
packages/repack/src/server/BaseDevServer.ts:46
• wsMessageServer: WebSocketMessageServer
Message server instance.
packages/repack/src/server/BaseDevServer.ts:44
• wsRouter: WebSocketRouter
WebSocket router instance.
packages/repack/src/server/BaseDevServer.ts:40
▸ run(): Promise
<void
>
Runs Fastify and listens on port and host specified in constructor.
Promise
<void
>
packages/repack/src/server/BaseDevServer.ts:208
▸ setup(): Promise
<void
>
Sets up common routes.
All classes that implements BaseDevServer should call this method before calling run.
Promise
<void
>