🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@backstage/backend-common

Package Overview
Dependencies
Maintainers
3
Versions
1347
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@backstage/backend-common

Common functionality library for Backstage backends

0.25.0
latest
Source
npm
Version published
Weekly downloads
160K
8.15%
Maintainers
3
Weekly downloads
 
Created
Source

@backstage/backend-common

[!CAUTION] This package is deprecated and will be removed in a near future, so please follow the deprecated instructions for the exports you still use.

Common functionality library for Backstage backends, implementing logging, error handling and similar.

Usage

Add the library to your backend package:

# From your Backstage root directory
yarn --cwd packages/backend add @backstage/backend-common

then make use of the handlers and logger as necessary:

import {
  errorHandler,
  getRootLogger,
  notFoundHandler,
  requestLoggingHandler,
} from '@backstage/backend-common';

const app = express();
app.use(requestLoggingHandler());
app.use('/home', myHomeRouter);
app.use(notFoundHandler());
app.use(errorHandler());

app.listen(PORT, () => {
  getRootLogger().info(`Listening on port ${PORT}`);
});

Documentation

  • Backstage Readme
  • Backstage Documentation

Keywords

backstage

FAQs

Package last updated on 17 Sep 2024

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