mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 03:01:21 -04:00
* Updating the Licenses, except for applying eslint, building * Applying ESLint rules,building @kbn/pm, regenerating api docs
45 lines
1.2 KiB
TypeScript
45 lines
1.2 KiB
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* and the Server Side Public License, v 1; you may not use this file except in
|
|
* compliance with, at your election, the Elastic License or the Server Side
|
|
* Public License, v 1.
|
|
*/
|
|
|
|
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: PluginInitializerContext) {
|
|
this.logger = initializerContext.logger.get();
|
|
}
|
|
|
|
public setup(core: CoreSetup) {
|
|
this.logger.debug('State_demo: Ssetup');
|
|
const router = core.http.createRouter();
|
|
|
|
// Register server side APIs
|
|
defineRoutes(router);
|
|
|
|
return {};
|
|
}
|
|
|
|
public start(core: CoreStart) {
|
|
this.logger.debug('State_demo: Started');
|
|
return {};
|
|
}
|
|
|
|
public stop() {}
|
|
}
|
|
|
|
export { StateDemoServerPlugin as Plugin };
|