Skip to main content

@backstage/backend-app-api

Home > @backstage/backend-app-api

Core API used by Backstage backend apps.

Classes

ClassDescription
DefaultRootHttpRouterThe default implementation of the RootHttpRouterService interface for coreServices.rootHttpRouter.
HostDiscovery

HostDiscovery is a basic PluginEndpointDiscovery implementation that can handle plugins that are hosted in a single or multiple deployments.

The deployment may be scaled horizontally, as long as the external URL is the same for all instances. However, internal URLs will always be resolved to the same host, so there won't be any balancing of internal traffic.

MiddlewareFactoryA utility to configure common middleware.
WinstonLoggerA LoggerService implementation based on winston.

Functions

FunctionDescription
createConfigSecretEnumerator(options)
createHttpServer(listener, options, deps)Creates a Node.js HTTP or HTTPS server instance.
createLifecycleMiddleware(options)Creates a middleware that pauses requests until the service has started.
createSpecializedBackend(options)
loadBackendConfig(options)

Load configuration for a Backend.

This function should only be called once, during the initialization of the backend.

readCorsOptions(config)Attempts to read a CORS options object from the backend configuration object.
readHelmetOptions(config)Attempts to read Helmet options from the backend configuration object.
readHttpServerOptions(config)Reads HttpServerOptions from a Config object.

Interfaces

InterfaceDescription
Backend
CreateSpecializedBackendOptions
DefaultRootHttpRouterOptionsOptions for the DefaultRootHttpRouter class.
ExtendedHttpServerAn HTTP server extended with utility methods.
HttpRouterFactoryOptions
LifecycleMiddlewareOptionsOptions for createLifecycleMiddleware().
MiddlewareFactoryErrorOptionsOptions passed to the MiddlewareFactory.error() middleware.
MiddlewareFactoryOptionsOptions used to create a MiddlewareFactory.
RootConfigFactoryOptions
RootHttpRouterConfigureContext
WinstonLoggerOptions

Variables

VariableDescription
authServiceFactory
cacheServiceFactory
databaseServiceFactory
discoveryServiceFactory
httpAuthServiceFactory
httpRouterServiceFactory
identityServiceFactory
lifecycleServiceFactoryAllows plugins to register shutdown hooks that are run when the process is about to exit.
loggerServiceFactory
permissionsServiceFactory
rootConfigServiceFactory
rootHttpRouterServiceFactory
rootLifecycleServiceFactoryAllows plugins to register shutdown hooks that are run when the process is about to exit.
rootLoggerServiceFactory
schedulerServiceFactory
tokenManagerServiceFactory
urlReaderServiceFactory
userInfoServiceFactory

Type Aliases

Type AliasDescription
HttpServerCertificateOptionsOptions for configuring HTTPS for an HTTP server.
HttpServerOptionsOptions for starting up an HTTP server.
IdentityFactoryOptionsAn identity client options object which allows extra configurations
RootHttpRouterFactoryOptions