1
0
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:
Laurent Cozic
2018-05-26 11:18:54 +01:00
parent a2da2f681c
commit 0938297250
6 changed files with 28 additions and 10 deletions

View File

@@ -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;