@drodil/backstage-plugin-qeta-backend v2.2.1
qeta-backend
Welcome to the qeta-backend backend plugin!
This plugin was created through the Backstage CLI
Getting started
Your plugin has been added to the example app in this repository, meaning you'll be able to access it by running yarn
start
in the root directory, and then navigating to /qeta-backend.
You can also serve the plugin in isolation by running yarn start
in the plugin directory.
This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads.
It is only meant for local development, and the setup for it can be found inside the /dev directory.
Add to your application
Adding backend
Create new file to packages/backend/src/plugins/qeta.ts:
import {
createRouter,
DatabaseQetaStore,
} from '@drodil/backstage-plugin-qeta-backend';
import { PluginEnvironment } from '../types';
export default async function createPlugin({
logger,
database,
identity,
config,
}: PluginEnvironment) {
const db = await DatabaseQetaStore.create({
database: database,
});
return await createRouter({
logger,
database: db,
identity,
config,
});
}
Now add this plugin to your packages/backend/src/index.ts:
import qeta from './plugins/qeta';
const qetaEnv = useHotMemoize(module, () => createEnv('qeta'));
apiRouter.use('/qeta', await qeta(qetaEnv));
Integration with @backstage/plugin-search
packages/backend/src/index.ts
apiRouter.use('/search', await search(searchEnv, qetaEnv.database));
backend/src/plugins/search.ts
import { PluginDatabaseManager } from '@backstage/backend-common';
import { QetaCollatorFactory } from '@drodil/backstage-plugin-qeta-backend';
export default async function createPlugin(
env: PluginEnvironment,
qetaDatabase: PluginDatabaseManager,
): Promise<Router> {
const indexBuilder = new IndexBuilder({
logger: env.logger,
searchEngine,
});
indexBuilder.addCollator({
schedule,
factory: QetaCollatorFactory.fromConfig(env.config, {
logger: env.logger,
database: qetaDatabase,
}),
});
const { scheduler } = await indexBuilder.build();
scheduler.start();
// ...
}
10 days ago
12 days ago
17 days ago
17 days ago
19 days ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
9 months ago
10 months ago
6 months ago
7 months ago
7 months ago
7 months ago
6 months ago
9 months ago
7 months ago
7 months ago
7 months ago
8 months ago
10 months ago
12 months ago
11 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
12 months ago
12 months ago
12 months ago
11 months ago
11 months ago
11 months ago
11 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago