packages/core: make AppConfigLoader return an array, and added defaultConfigLoader + tests

This commit is contained in:
Patrik Oldsberg
2020-06-02 17:00:01 +02:00
parent 5774ec46ce
commit 483fa94d0e
7 changed files with 152 additions and 15 deletions
+13 -11
View File
@@ -24,18 +24,20 @@ import apis from './apis';
const app = createApp({
apis,
plugins: Object.values(plugins),
configLoader: async () => ({
app: {
title: 'Backstage Example App',
baseUrl: 'http://localhost:3000',
configLoader: async () => [
{
app: {
title: 'Backstage Example App',
baseUrl: 'http://localhost:3000',
},
backend: {
baseUrl: 'http://localhost:7000',
},
organization: {
name: 'Spotify',
},
},
backend: {
baseUrl: 'http://localhost:7000',
},
organization: {
name: 'Spotify',
},
}),
],
});
const AppProvider = app.getProvider();