mirror of
https://github.com/zadam/trilium.git
synced 2024-11-14 03:40:27 +08:00
25 lines
No EOL
635 B
JavaScript
25 lines
No EOL
635 B
JavaScript
"use strict";
|
|
|
|
const os = require('os');
|
|
const fs = require('fs');
|
|
|
|
const TRILIUM_DATA_DIR = process.env.TRILIUM_DATA_DIR || os.homedir() + "/trilium-data";
|
|
|
|
if (!fs.existsSync(TRILIUM_DATA_DIR)) {
|
|
fs.mkdirSync(TRILIUM_DATA_DIR, 0o700);
|
|
}
|
|
|
|
const DOCUMENT_PATH = TRILIUM_DATA_DIR + "/document.db";
|
|
const BACKUP_DIR = TRILIUM_DATA_DIR + "/backup";
|
|
const LOG_DIR = TRILIUM_DATA_DIR + "/log";
|
|
const EXPORT_DIR = TRILIUM_DATA_DIR + "/export";
|
|
const ANONYMIZED_DB_DIR = TRILIUM_DATA_DIR + "/anonymized-db";
|
|
|
|
module.exports = {
|
|
TRILIUM_DATA_DIR,
|
|
DOCUMENT_PATH,
|
|
BACKUP_DIR,
|
|
LOG_DIR,
|
|
EXPORT_DIR,
|
|
ANONYMIZED_DB_DIR
|
|
}; |