Files
OpenFrontIO/src/core/configuration/DevConfig.ts
T
Aotumuri 3cd22745f7 Allow NUM_WORKERS override (#2776)
Resolves #2610

## Description:

Add NUM_WORKERS env override for server worker count.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

## Please put your Discord username so you can be contacted if a bug or
regression is found:
aotumuri

---------

Co-authored-by: Evan <evanpelle@gmail.com>
2026-01-06 19:40:00 -08:00

59 lines
1.1 KiB
TypeScript

import { UserSettings } from "../game/UserSettings";
import { GameConfig } from "../Schemas";
import { GameEnv, ServerConfig } from "./Config";
import { DefaultConfig, DefaultServerConfig } from "./DefaultConfig";
export class DevServerConfig extends DefaultServerConfig {
turnstileSiteKey(): string {
return "1x00000000000000000000AA";
}
turnstileSecretKey(): string {
return "1x0000000000000000000000000000000AA";
}
adminToken(): string {
return "WARNING_DEV_ADMIN_KEY_DO_NOT_USE_IN_PRODUCTION";
}
apiKey(): string {
return "WARNING_DEV_API_KEY_DO_NOT_USE_IN_PRODUCTION";
}
env(): GameEnv {
return GameEnv.Dev;
}
gameCreationRate(): number {
return 5 * 1000;
}
numWorkers(): number {
return 2;
}
jwtAudience(): string {
return "localhost";
}
gitCommit(): string {
return "DEV";
}
domain(): string {
return "localhost";
}
subdomain(): string {
return "";
}
}
export class DevConfig extends DefaultConfig {
constructor(
sc: ServerConfig,
gc: GameConfig,
us: UserSettings | null,
isReplay: boolean,
) {
super(sc, gc, us, isReplay);
}
}