Skip to content

WsgateModule

The main module. Call WsgateModule.setup() in main.ts after creating the app.

No extra imports or providers are needed in your root module — metadata is collected automatically when gateway files are imported.

setup(routePath, app, options?)

ParameterTypeDescription
routePathstringRoute to mount the UI (e.g. '/wsgate')
appINestApplicationThe running NestJS app instance
optionsWsgateOptionsOptional config

WsgateOptions

OptionTypeDefaultDescription
titlestring'WsGate'Title shown in the UI header
disabledbooleanfalseDisable the UI entirely

Example

typescript
await WsgateModule.setup('/wsgate', app, {
  title: 'Chat API',
  disabled: process.env.NODE_ENV === 'production',
});

Released under the MIT License.