added TRILIUM_SYNC_SERVER_HOST env. variable to prevent prod sync issues

This commit is contained in:
zadam
2023-01-06 15:14:04 +01:00
parent 218f526a92
commit f86fb0d0a2
2 changed files with 7 additions and 5 deletions

View File

@@ -15,7 +15,9 @@ function get(name) {
}
module.exports = {
getSyncServerHost: () => get('syncServerHost'),
// env variable is the easiest way to guarantee we won't overwrite prod data during development
// after copying prod document/data directory
getSyncServerHost: () => process.env.TRILIUM_SYNC_SERVER_HOST || get('syncServerHost'),
isSyncSetup: () => {
const syncServerHost = get('syncServerHost');