1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-12 08:54:00 +02:00
joplin/ReactNativeClient/lib/randomClipperPort.js

21 lines
335 B
JavaScript
Raw Normal View History

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;
return state;
}
2019-07-29 15:43:53 +02:00
module.exports = randomClipperPort;