add a CLIENT_CONFIG to the client, serve from BE with env vars
This commit is contained in:
1 parent
ef175950b2
commit
62031a0ab1
12 files changed
+81
-7
No files matched your search
@@ -83,6 +83,19 @@ describe("SettingsService", () => {
|
||||
dbConnectionString: "mongodb://localhost:27017/test_db",
|
||||
dbType: "mongodb",
|
||||
statusPageThemesEnabled: false,
|
||||
clientConfig: {},
|
||||
});
|
||||
});
|
||||
|
||||
it("maps only set CLIENT_CONFIG_* env vars into clientConfig", () => {
|
||||
const { service } = createService({
|
||||
CLIENT_CONFIG_API_BASE_URL: "https://api.example.com/api/v1",
|
||||
CLIENT_CONFIG_LOG_LEVEL: "warn",
|
||||
});
|
||||
|
||||
expect(service.loadSettings().clientConfig).toEqual({
|
||||
apiBaseUrl: "https://api.example.com/api/v1",
|
||||
logLevel: "warn",
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user