mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 21:00:41 +00:00
Add runtime configuration loader and styles for web application
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { startNodewardenApp } from './app.js';
|
||||
|
||||
async function loadRuntimeConfig() {
|
||||
try {
|
||||
const resp = await fetch('/api/web/config', { method: 'GET' });
|
||||
if (!resp.ok) throw new Error('runtime config request failed');
|
||||
return await resp.json();
|
||||
} catch {
|
||||
return { defaultKdfIterations: 600000 };
|
||||
}
|
||||
}
|
||||
|
||||
const cfg = await loadRuntimeConfig();
|
||||
startNodewardenApp(cfg || { defaultKdfIterations: 600000 });
|
||||
|
||||
Reference in New Issue
Block a user