mirror of
https://github.com/ajnart/homarr.git
synced 2026-02-24 23:40:55 +01:00
11 lines
356 B
TypeScript
11 lines
356 B
TypeScript
import fs from 'fs';
|
|
import { BackendConfigType } from '../../types/config';
|
|
import { generateConfigPath } from './generateConfigPath';
|
|
|
|
export function writeConfig(config: BackendConfigType) {
|
|
const path = generateConfigPath(config.configProperties.name);
|
|
return fs.writeFileSync(path, JSON.stringify(config, null, 4), {
|
|
encoding: 'utf8',
|
|
});
|
|
}
|