Class: BaseDevServer

Base class for all Fastify-based servers. It handles creation of a Fastify instance, creation of all WebSocket servers and running Fastify.

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new BaseDevServer(config, loggerOptions?)

Constructs new BaseDevServer instance.

Parameters

Name Type Description
config BaseDevServerConfig Configuration options.
loggerOptions? DevServerLoggerOptions Logger options.

Defined in

packages/repack/src/server/BaseDevServer.ts:56

Properties

config

Protected config: BaseDevServerConfig

Configuration options.

Defined in

packages/repack/src/server/BaseDevServer.ts:35


fastify

fastify: FastifyDevServer

Fastify instance.

Defined in

packages/repack/src/server/BaseDevServer.ts:38


wsClientServer

wsClientServer: WebSocketDevClientServer

Server instance for React Native clients.

Defined in

packages/repack/src/server/BaseDevServer.ts:48


wsDebuggerServer

wsDebuggerServer: WebSocketDebuggerServer

Debugger server instance.

Defined in

packages/repack/src/server/BaseDevServer.ts:42


wsEventsServer

wsEventsServer: WebSocketEventsServer

Events server instance.

Defined in

packages/repack/src/server/BaseDevServer.ts:46


wsMessageServer

wsMessageServer: WebSocketMessageServer

Message server instance.

Defined in

packages/repack/src/server/BaseDevServer.ts:44


wsRouter

wsRouter: WebSocketRouter

WebSocket router instance.

Defined in

packages/repack/src/server/BaseDevServer.ts:40

Methods

run

run(): Promise<void>

Runs Fastify and listens on port and host specified in constructor.

Returns

Promise<void>

Defined in

packages/repack/src/server/BaseDevServer.ts:208


setup

setup(): Promise<void>

Sets up common routes.

All classes that implements BaseDevServer should call this method before calling run.

Returns

Promise<void>

Defined in

packages/repack/src/server/BaseDevServer.ts:99