Files
backstage/packages/backend-common
Mikael Östberg 6c91854391 Fix missing authentication in GitHubUrlReader
An oversight that probably stems from that most repositories for tech-docs are public anyway. 
Ours are not, and are inside of a GitHub Enterprise, which is how i found this tiny bug. 

I wish i knew how to mock the cross-fetch in order to inspect the Authorization header of the request to test this fix. 
I can only confirm that it works on our backstage that targets GHE.
2020-12-03 20:41:31 +01:00
..
2020-12-03 15:28:22 +00:00
2020-12-03 15:28:22 +00:00
2020-11-03 11:03:49 +01:00

@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