MCPcopy Index your code
hub / github.com/monkeytypegame/monkeytype / updateFromConfigurationFile

Function updateFromConfigurationFile

backend/src/init/configuration.ts:151–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

149}
150
151export async function updateFromConfigurationFile(): Promise<void> {
152 if (existsSync(SERVER_CONFIG_FILE_PATH)) {
153 Logger.info(
154 `Reading server configuration from file ${SERVER_CONFIG_FILE_PATH}`,
155 );
156 const json = readFileSync(SERVER_CONFIG_FILE_PATH, "utf-8");
157 const data = parseJsonWithSchema(
158 json,
159 z.object({
160 configuration: PartialConfigurationSchema,
161 }),
162 );
163
164 await patchConfiguration(data.configuration);
165 }
166}
167
168export const __testing = {
169 mergeConfigurations,

Callers 1

bootServerFunction · 0.90

Calls 1

patchConfigurationFunction · 0.85

Tested by

no test coverage detected