electron: Ignore TRILIUM_HOST env (fixes #368)

This commit is contained in:
Elian Doran 2024-08-31 23:41:08 +03:00
parent 27f513e2a3
commit 08060abe76
No known key found for this signature in database

View File

@ -1,3 +1,13 @@
import config from "./config.js";
import utils from "./utils.js";
export default process.env.TRILIUM_HOST || config['Network']['host'] || '0.0.0.0';
function getHost() {
const envHost = process.env.TRILIUM_HOST;
if (envHost && !utils.isElectron) {
return envHost;
}
return config['Network']['host'] || '0.0.0.0';
}
export default getHost();