fixed API and stopping delay
This commit is contained in:
@@ -12,7 +12,7 @@ import { fileURLToPath } from 'node:url';
|
||||
import { existsSync } from 'node:fs';
|
||||
|
||||
import { initDb } from './db/index.js';
|
||||
import { authMiddleware, ensureBootstrapAdmin, ensureMainUser } from './auth.js';
|
||||
import { authMiddleware, ensureBootstrapAdmin, ensureMainUser, ensureBootstrapApiKey } from './auth.js';
|
||||
import { applySeedIfEmpty } from './sources/seed.js';
|
||||
import { scheduleHealthCheck } from './streams/checker.js';
|
||||
import { attachWs } from './ws.js';
|
||||
@@ -39,6 +39,7 @@ export async function startServer(opts = {}) {
|
||||
password: process.env.ADMIN_BOOTSTRAP_PASSWORD
|
||||
});
|
||||
ensureMainUser(process.env.MAIN_USER || 'morphix');
|
||||
ensureBootstrapApiKey(process.env.ORADIO_API_KEY);
|
||||
const seedResult = applySeedIfEmpty();
|
||||
console.log('[seed]', seedResult);
|
||||
ensureImageDirs();
|
||||
|
||||
Reference in New Issue
Block a user