import { PluginInitializerContext , CoreSetup , CoreStart , Plugin , Logger , } from '../../../src/core/server' ; import { StateDemoPluginSetup , StateDemoPluginStart } from './types' ; import { defineRoutes } from './routes' ; export class StateDemoServerPlugin implements Plugin < StateDemoPluginSetup , StateDemoPluginStart > { private readonly logger : Logger ; constructor ( initializerContext ) { this . logger = initializerContext . logger . get ( ) ; } public setup ( core ) { this . logger . debug ( 'State_demo: Ssetup' ) ; const router = core . http . createRouter ( ) ; defineRoutes ( router ) ; return { } ; } public start ( core ) { this . logger . debug ( 'State_demo: Started' ) ; return { } ; } public stop ( ) { } } export { StateDemoServerPlugin as Plugin } ;