@nestwhats/dashboard
v1.2.0
Published
Web dashboard for NestWhats multi-client monitoring
Downloads
370
Maintainers
Readme
About
@nestwhats/dashboard provides a standalone HTTP server with a real-time web UI that shows the status of all registered WhatsApp clients — QR codes, connection status, phone number, and uptime.
[!NOTE] Requires
nestwhats^2.2.0as a peer dependency.
Installation
npm i nestwhats @nestwhats/dashboard
yarn add nestwhats @nestwhats/dashboard
pnpm add nestwhats @nestwhats/dashboardUsage
Import NestWhatsDashboardModule alongside your NestWhatsModule:
import { NestWhatsModule } from 'nestwhats';
import { NestWhatsDashboardModule } from '@nestwhats/dashboard';
import { Module } from '@nestjs/common';
@Module({
imports: [
NestWhatsModule.forRoot({ prefix: '!' }),
NestWhatsDashboardModule.forRoot({
port: 3001,
path: '/dashboard',
}),
],
})
export class AppModule {}Open http://localhost:3001/dashboard to view the dashboard.
Options
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| port | number | 3001 | Port for the dashboard HTTP server |
| path | string | '/' | URL path where the dashboard is served |
| auth.username | string | — | Basic auth username (optional) |
| auth.password | string | — | Basic auth password (optional) |
With basic auth
NestWhatsDashboardModule.forRoot({
port: 3001,
auth: {
username: 'admin',
password: 'secret',
},
})Async configuration
NestWhatsDashboardModule.forRoot({
port: process.env.DASHBOARD_PORT ? Number(process.env.DASHBOARD_PORT) : 3001,
auth: {
username: process.env.DASHBOARD_USER!,
password: process.env.DASHBOARD_PASS!,
},
})