You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
Clipper: Make dev icon look different and run dev server on different port
This commit is contained in:
@@ -132,13 +132,15 @@ const AleaModule = function () {
|
||||
|
||||
const Alea = AleaModule()
|
||||
|
||||
function findClipperPort(state) {
|
||||
function randomClipperPort(state, env) {
|
||||
const seed = env === 'prod' ? 1867 : 2001;
|
||||
|
||||
const minPort = 1024
|
||||
const maxPort = 49151
|
||||
|
||||
let prng = null;
|
||||
if (!state) {
|
||||
prng = new Alea(1867)
|
||||
prng = new Alea(seed)
|
||||
state = { prng: prng }
|
||||
} else {
|
||||
prng = state.prng;
|
||||
@@ -161,4 +163,4 @@ function findClipperPort(state) {
|
||||
return state;
|
||||
}
|
||||
|
||||
module.exports = findClipperPort;
|
||||
module.exports = randomClipperPort;
|
||||
Reference in New Issue
Block a user