mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 18:39:22 +08:00
feat(services/config): add TriliumConfig Type
This commit is contained in:
parent
edeaca6d1f
commit
c7bd5e2c67
@ -17,7 +17,28 @@ if (!fs.existsSync(dataDir.CONFIG_INI_PATH)) {
|
||||
|
||||
const iniConfig = ini.parse(fs.readFileSync(dataDir.CONFIG_INI_PATH, "utf-8"));
|
||||
|
||||
const config = {
|
||||
export interface TriliumConfig {
|
||||
General: {
|
||||
instanceName: string;
|
||||
noAuthentication: boolean;
|
||||
noBackup: boolean;
|
||||
noDesktopIcon: boolean;
|
||||
};
|
||||
Network: {
|
||||
host: string;
|
||||
port: string;
|
||||
https: boolean;
|
||||
certPath: string;
|
||||
keyPath: string;
|
||||
trustedReverseProxy: boolean | string;
|
||||
};
|
||||
Sync: {
|
||||
syncServerHost: string;
|
||||
syncServerTimeout: string;
|
||||
syncProxy: string;
|
||||
};
|
||||
}
|
||||
const config: TriliumConfig = {
|
||||
|
||||
General: {
|
||||
instanceName: process.env.TRILIUM_GENERAL_INSTANCENAME || iniConfig.General.instanceName,
|
||||
|
Loading…
x
Reference in New Issue
Block a user