Fix registration of component

Signed-off-by: josh <josh.timmons@hashicorp.com>
This commit is contained in:
josh
2023-06-04 15:30:32 -04:00
parent 285de62914
commit 523af24224
6 changed files with 65 additions and 12 deletions
+3 -1
View File
@@ -16,12 +16,14 @@
import { getRootLogger } from '@backstage/backend-common';
import yn from 'yn';
import { startStandaloneServer } from './service/standaloneServer';
import { ConfigReader } from '@backstage/config';
const config = new ConfigReader({});
const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7007;
const enableCors = yn(process.env.PLUGIN_CORS, { default: false });
const logger = getRootLogger();
startStandaloneServer({ port, enableCors, logger }).catch(err => {
startStandaloneServer({ config, port, enableCors, logger }).catch(err => {
logger.error(err);
process.exit(1);
});