import type { NextFunction , Request , Response } from 'express' ; import { initWebchatRouter } from './webchat' ; import { initSettingsRouter } from './settings' ; import { initApiRouter } from './api' ; async function initRouters ( options ) { const { getRouter } = options ; const router = getRouter ( ) ; router . get ( '/ping' , ( req , res , _next ) => res . json ( { message : 'pong' } ) ) ; router . use ( '/webchat' , await initWebchatRouter ( options ) ) ; router . use ( '/settings' , await initSettingsRouter ( options ) ) ; router . use ( '/api' , await initApiRouter ( options ) ) ; } export { initRouters } ;