Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More

@backstage/backend-common

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@backstage/backend-common

Common functionality library for Backstage backends



Version published
Weekly downloads
133K
increased by93.82%
Maintainers
4
Weekly downloads
 
Created
Issues
483

What is @backstage/backend-common?

@backstage/backend-common is a utility library for building backend services in the Backstage ecosystem. It provides common functionalities such as logging, database connections, and server setup, which are essential for developing robust and scalable backend services.

What are @backstage/backend-common's main functionalities?

Logging

Provides a root logger that can be used throughout the application for consistent logging.

const { getRootLogger } = require('@backstage/backend-common');
const logger = getRootLogger();
logger.info('This is an info message');

Database Connection

Helps in setting up and managing database connections using a configuration object.

const { DatabaseManager } = require('@backstage/backend-common');
const config = { /* database configuration */ };
const databaseManager = DatabaseManager.fromConfig(config);
const db = databaseManager.forPlugin('my-plugin');

Server Setup

Simplifies the process of setting up a web server with routing and middleware.

const { createServiceBuilder } = require('@backstage/backend-common');
const service = createServiceBuilder(module)
  .setPort(7000)
  .addRouter('/api', myApiRouter)
  .start();

Other packages similar to @backstage/backend-common

Keywords

FAQs

Package last updated on 07 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts