Class: DevServer

Class for setting up and running development server for React Native application. It's usually created by the DevServerPlugin.

Each DevServer instance is platform-specific, for example for ios and android platforms, you need 2 DevServer running (on different ports). Alternatively you can use DevServerProxy to spawn new processes with Webpack compilations for each platform.

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new DevServer(config, compiler)

Constructs new DevServer instance.

Parameters

Name Type Description
config DevServerConfig Configuration options.
compiler Compiler Webpack compiler instance.

Overrides

BaseDevServer.constructor

Defined in

packages/repack/src/server/DevServer.ts:66

Properties

config

Protected config: BaseDevServerConfig

Configuration options.

Inherited from

BaseDevServer.config

Defined in

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


fastify

fastify: FastifyDevServer

Fastify instance.

Inherited from

BaseDevServer.fastify

Defined in

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


hmrServer

hmrServer: WebSocketHMRServer

HMR WebSocket server instance to allow HMR clients to receive updates.

Defined in

packages/repack/src/server/DevServer.ts:54


symbolicator

symbolicator: Symbolicator

Symbolicator instance to transform stack traces using Source Maps.

Defined in

packages/repack/src/server/DevServer.ts:58


wdm

wdm: WebpackDevMiddleware

webpack-dev-middleware instance.

Defined in

packages/repack/src/server/DevServer.ts:52


wsClientServer

wsClientServer: WebSocketDevClientServer

Server instance for React Native clients.

Inherited from

BaseDevServer.wsClientServer

Defined in

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


wsDashboardServer

wsDashboardServer: WebSocketDashboardServer

Dashboard WebSocket server instance to provide events to dashboard web client.

Defined in

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


wsDebuggerServer

wsDebuggerServer: WebSocketDebuggerServer

Debugger server instance.

Inherited from

BaseDevServer.wsDebuggerServer

Defined in

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


wsEventsServer

wsEventsServer: WebSocketEventsServer

Events server instance.

Inherited from

BaseDevServer.wsEventsServer

Defined in

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


wsMessageServer

wsMessageServer: WebSocketMessageServer

Message server instance.

Inherited from

BaseDevServer.wsMessageServer

Defined in

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


wsRouter

wsRouter: WebSocketRouter

WebSocket router instance.

Inherited from

BaseDevServer.wsRouter

Defined in

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

Methods

run

run(): Promise<void>

Runs development server.

Returns

Promise<void>

Overrides

BaseDevServer.run

Defined in

packages/repack/src/server/DevServer.ts:198


setup

setup(): Promise<void>

Sets up Fastify plugins and routes.

Returns

Promise<void>

Overrides

BaseDevServer.setup

Defined in

packages/repack/src/server/DevServer.ts:144