mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 13:39:01 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			288 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			288 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import config from "./config.js";
 | 
						|
import { isElectron } from "./utils.js";
 | 
						|
 | 
						|
function getHost() {
 | 
						|
    const envHost = process.env.TRILIUM_HOST;
 | 
						|
    if (envHost && !isElectron) {
 | 
						|
        return envHost;
 | 
						|
    }
 | 
						|
 | 
						|
    return config["Network"]["host"] || "0.0.0.0";
 | 
						|
}
 | 
						|
 | 
						|
export default getHost();
 |