66ed65899f
Bumps [supertest](https://github.com/visionmedia/supertest) from 4.0.2 to 6.1.3. - [Release notes](https://github.com/visionmedia/supertest/releases) - [Commits](https://github.com/visionmedia/supertest/compare/v4.0.2...v6.1.3) Signed-off-by: dependabot[bot] <support@github.com>
@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}`);
});