UNPKG

@das3mical/adonis-mercure

Version:

A simple AdonisJS provider to interact with Mercure hub

15 lines (14 loc) 385 B
import '../src/types/extended.js'; import { Mercure } from '../src/mercure.js'; export default class MercureProvider { app; constructor(app) { this.app = app; } async boot() { this.app.container.singleton('mercure', async () => { const config = this.app.config.get('mercure', {}); return new Mercure(config); }); } }