Isolate API process from mining workers

This commit is contained in:
Ben
2026-06-07 22:53:15 -04:00
parent 51e3afb7e7
commit f14d76c2ea
4 changed files with 49 additions and 11 deletions
+2 -1
View File
@@ -15,7 +15,8 @@ async function bootstrap() {
return;
}
const serveApi = process.env.MASTER !== 'false';
const apiEnabled = process.env.API_ENABLED?.toLowerCase();
const serveApi = apiEnabled == null ? process.env.MASTER !== 'false' : apiEnabled === 'true';
const secure = serveApi && process.env.API_SECURE?.toLowerCase() === 'true';
const currentDirectory = process.cwd();
const keyPath = path.join(currentDirectory, 'secrets', 'key.pem');