You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
Cli: Added headless server command (Beta) (#1860)
* Trying to implement headless server * Cli: Cleaned up and completed server command so that it is usable. Added warnings as it is advanced usage only at this point. * Restored welcome assets
This commit is contained in:
@@ -1,20 +1,22 @@
|
||||
function randomClipperPort(state, env) {
|
||||
const startPorts = {
|
||||
prod: 41184,
|
||||
dev: 27583,
|
||||
};
|
||||
|
||||
const startPort = env === 'prod' ? startPorts.prod : startPorts.dev;
|
||||
|
||||
if (!state) {
|
||||
state = { offset: 0 };
|
||||
} else {
|
||||
state.offset++;
|
||||
}
|
||||
|
||||
state.port = startPort + state.offset;
|
||||
state.port = startPort(env) + state.offset;
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
module.exports = randomClipperPort;
|
||||
function startPort(env) {
|
||||
const startPorts = {
|
||||
prod: 41184,
|
||||
dev: 27583,
|
||||
};
|
||||
|
||||
return env === 'prod' ? startPorts.prod : startPorts.dev;
|
||||
}
|
||||
|
||||
module.exports = { randomClipperPort, startPort };
|
||||
|
||||
Reference in New Issue
Block a user