mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
startup now respects port in config file
This commit is contained in:
parent
92027af426
commit
963b81864c
1
app.js
1
app.js
@ -1,5 +1,4 @@
|
|||||||
const log = require('./services/log');
|
const log = require('./services/log');
|
||||||
log.info("App starting up");
|
|
||||||
const express = require('express');
|
const express = require('express');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const favicon = require('serve-favicon');
|
const favicon = require('serve-favicon');
|
||||||
|
6
bin/www
6
bin/www
@ -11,11 +11,13 @@ process.on('unhandledRejection', error => {
|
|||||||
const app = require('../app');
|
const app = require('../app');
|
||||||
const debug = require('debug')('node:server');
|
const debug = require('debug')('node:server');
|
||||||
const http = require('http');
|
const http = require('http');
|
||||||
|
const config = require('../services/config');
|
||||||
|
const log = require('../services/log');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get port from environment and store in Express.
|
* Get port from environment and store in Express.
|
||||||
*/
|
*/
|
||||||
const port = normalizePort(process.env.PORT || '3000');
|
const port = normalizePort(config['Network']['port'] || '3000');
|
||||||
app.set('port', port);
|
app.set('port', port);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -23,6 +25,8 @@ app.set('port', port);
|
|||||||
*/
|
*/
|
||||||
const server = http.createServer(app);
|
const server = http.createServer(app);
|
||||||
|
|
||||||
|
log.info("App server starting up at port " + port);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Listen on provided port, on all network interfaces.
|
* Listen on provided port, on all network interfaces.
|
||||||
*/
|
*/
|
||||||
|
@ -1,2 +1,7 @@
|
|||||||
|
[Network]
|
||||||
|
port=80
|
||||||
|
|
||||||
[Sync]
|
[Sync]
|
||||||
syncServerHost=
|
syncServerHost=
|
||||||
|
syncServerTimeout=10000
|
||||||
|
syncProxy=
|
Loading…
x
Reference in New Issue
Block a user