mirror of
https://github.com/zadam/trilium.git
synced 2025-11-17 02:30:42 +01:00
electron build uses random free port, fixes #142
This commit is contained in:
10
src/services/port.js
Normal file
10
src/services/port.js
Normal file
@@ -0,0 +1,10 @@
|
||||
const getPort = require('get-port');
|
||||
const config = require('./config');
|
||||
const utils = require('./utils');
|
||||
|
||||
if (utils.isElectron()) {
|
||||
module.exports = getPort();
|
||||
}
|
||||
else {
|
||||
module.exports = Promise.resolve(config['Network']['port'] || '3000');
|
||||
}
|
||||
Reference in New Issue
Block a user