feat: WhatsApp Nucleo con Nuxt 4 + Baileys v7
Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 6m46s
Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 6m46s
Reemplazo completo de Evolution API por implementación directa con Baileys. Características: - Dashboard completo con Nuxt UI v4 - Soporte para múltiples instancias de WhatsApp - Conexión via QR code o pairing code - Persistencia de mensajes en PostgreSQL - API REST para integraciones externas - Webhooks con firma HMAC - SSE para actualizaciones en tiempo real - Autenticación con Authentik
This commit is contained in:
18
server/plugins/baileys.ts
Normal file
18
server/plugins/baileys.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Nitro plugin to initialize Baileys manager on server start
|
||||
*/
|
||||
import { baileysManager } from '../services/baileys/manager'
|
||||
|
||||
export default defineNitroPlugin(async () => {
|
||||
console.log('[Plugin] Initializing Baileys Manager...')
|
||||
|
||||
// Small delay to ensure database is ready
|
||||
await new Promise(resolve => setTimeout(resolve, 2000))
|
||||
|
||||
try {
|
||||
await baileysManager.initialize()
|
||||
console.log('[Plugin] Baileys Manager initialized successfully')
|
||||
} catch (error) {
|
||||
console.error('[Plugin] Failed to initialize Baileys Manager:', error)
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user