0.0.10 • Published 9 months ago

@apono-io/backstage-plugin-apono-backend v0.0.10

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
9 months ago

Apono backend plugin for Backstage

Welcome to the apono backend plugin! This plugin is a part of the apono project.

Getting started

Enabling backend

New backend

yarn --cwd packages/backend add @apono-io/backstage-plugin-apono-backend

Add to packages/backend/src/index.ts:

backend.add(import('@apono-io/backstage-plugin-apono-backend'));

Now go to the configuration step.

Old backend

yarn --cwd packages/backend add @apono-io/backstage-plugin-apono-backend

Create a new file named packages/backend/src/plugins/apono.ts, and add the following to it:

import { createRouter } from '@apono-io/backstage-plugin-apono-backend';
import { Router } from 'express';
import { PluginEnvironment } from '../types';

export default async function createPlugin({
  logger,
  config,
}: PluginEnvironment): Promise<Router> {
  return await createRouter({ logger, config });
}

And finally, wire this into the overall backend router. Edit packages/backend/src/index.ts:

import apono from './plugins/apono';
// ...
async function main() {
  // ...
  const aponoEnv = useHotMemoize(module, () => createEnv('apono'));
  apiRouter.use('/apono', await apono(aponoEnv));
}

Configuration

The plugin requires configuration in the Backstage app-config.yaml to connect to the Apono API.

apono:
  publicKey: ${APONO_PUBLIC_KEY} # Base64 encoded RSA public key with minimum 2048 bits length
  privateKey: ${APONO_PRIVATE_KEY} # Base64 encoded RSA private key with minimum 2048 bits length

Contributing

Everyone is welcome to contribute to this repository. Feel free to raise issues or to submit Pull Requests.

0.0.10

9 months ago

0.0.9

9 months ago

0.0.8

9 months ago

0.0.7

9 months ago

0.0.6

9 months ago

0.0.5

9 months ago

0.0.4

9 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago