Socket
Book a DemoInstallSign in
Socket

@backstage/backend-common

Package Overview
Dependencies
Maintainers
4
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

Source
npmnpm
Version
0.0.0-nightly-202011921610
Version published
Weekly downloads
125K
0.16%
Maintainers
4
Weekly downloads
 
Created
Source

@backstage/backend-common

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

Usage

Add the library to your backend package:

yarn 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 09 Dec 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