mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 02:02:29 +08:00
16 lines
350 B
JavaScript
16 lines
350 B
JavaScript
const config = require('./config');
|
|
const utils = require('./utils');
|
|
const env = require('./env');
|
|
|
|
if (process.env.TRILIUM_PORT) {
|
|
module.exports = parseInt(process.env.TRILIUM_PORT);
|
|
return;
|
|
}
|
|
|
|
if (utils.isElectron()) {
|
|
module.exports = env.isDev() ? 37740 : 37840;
|
|
}
|
|
else {
|
|
module.exports = config['Network']['port'] || '3000';
|
|
}
|