mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
server-ts: Address self-review
This commit is contained in:
parent
d4c8d24d50
commit
99d50957dd
@ -10,7 +10,7 @@ if (config.Network.https) {
|
|||||||
process.exit(0);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
const port = require('./src/services/port.ts');
|
const port = require('./src/services/port');
|
||||||
const host = require('./src/services/host');
|
const host = require('./src/services/host');
|
||||||
|
|
||||||
const options = { timeout: 2000 };
|
const options = { timeout: 2000 };
|
||||||
|
@ -25,7 +25,7 @@ class OrderByAndLimitExp extends Expression {
|
|||||||
constructor(orderDefinitions: Pick<OrderDefinition, "direction" | "valueExtractor">[], limit?: number) {
|
constructor(orderDefinitions: Pick<OrderDefinition, "direction" | "valueExtractor">[], limit?: number) {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this.orderDefinitions = orderDefinitions as unknown as OrderDefinition[];
|
this.orderDefinitions = orderDefinitions as OrderDefinition[];
|
||||||
|
|
||||||
for (const od of this.orderDefinitions) {
|
for (const od of this.orderDefinitions) {
|
||||||
od.smaller = od.direction === "asc" ? -1 : 1;
|
od.smaller = od.direction === "asc" ? -1 : 1;
|
||||||
|
@ -45,7 +45,7 @@ function startTrilium() {
|
|||||||
* instead of the new one. This is complicated by the fact that it is possible to run multiple instances of Trilium
|
* instead of the new one. This is complicated by the fact that it is possible to run multiple instances of Trilium
|
||||||
* if port and data dir are configured separately. This complication is the source of the following weird usage.
|
* if port and data dir are configured separately. This complication is the source of the following weird usage.
|
||||||
*
|
*
|
||||||
* The line below makes sure that the "second-instance" (process in window) is fired. Normally it returns a boolean
|
* The line below makes sure that the "second-instance" (process in window.ts) is fired. Normally it returns a boolean
|
||||||
* indicating whether another instance is running or not, but we ignore that and kill the app only based on the port conflict.
|
* indicating whether another instance is running or not, but we ignore that and kill the app only based on the port conflict.
|
||||||
*
|
*
|
||||||
* A bit weird is that "second-instance" is triggered also on the valid usecases (different port/data dir) and
|
* A bit weird is that "second-instance" is triggered also on the valid usecases (different port/data dir) and
|
||||||
|
Loading…
x
Reference in New Issue
Block a user