b7de76ae72
Signed-off-by: Andre Wanlin <awanlin@spotify.com> Added changeset Signed-off-by: Andre Wanlin <awanlin@spotify.com> Updated API Report Signed-off-by: Andre Wanlin <awanlin@spotify.com> Updated references to use 12 and 16 Signed-off-by: Andre Wanlin <awanlin@spotify.com> Attempt to fix tests Signed-off-by: Andre Wanlin <awanlin@spotify.com> Added back old Ids Signed-off-by: Andre Wanlin <awanlin@spotify.com> Fixed test Signed-off-by: Andre Wanlin <awanlin@spotify.com> Updated API Report and test Signed-off-by: Andre Wanlin <awanlin@spotify.com> Added new setDefaults static method and related changes Signed-off-by: Andre Wanlin <awanlin@spotify.com> Updated API Report Signed-off-by: Andre Wanlin <awanlin@spotify.com> Improved logic based on feedback Signed-off-by: Andre Wanlin <awanlin@spotify.com> Added missing changeset Signed-off-by: Andre Wanlin <awanlin@spotify.com> Changes based on feedback Signed-off-by: Andre Wanlin <awanlin@spotify.com> API Report correction Signed-off-by: Andre Wanlin <awanlin@spotify.com> Updated to use new setDefaults Signed-off-by: Andre Wanlin <awanlin@spotify.com>
App backend plugin
This backend plugin can be installed to serve static content of a Backstage app.
Installation
Add both this package and your local frontend app package as dependencies to your backend, for example
# From your Backstage root directory
yarn add --cwd packages/backend @backstage/plugin-app-backend app
By adding the app package as a dependency we ensure that it is built as part of the backend, and that it can be resolved at runtime.
Now add the plugin router to your app, creating it for example like this:
const router = await createRouter({
logger: env.logger,
appPackageName: 'example-app',
});
And registering it like this:
createServiceBuilder(module)
...
.addRouter('', router);
Be sure to register the app router last, as it serves content for HTML5-mode navigation, i.e. falling back to serving index.html for any route that can't be found.