RSocket and WebSocket
Summary: Enable Flipper Desktop to run both RSocket and WebSocket servers. I've used 'alt' ports and/or server instead of tying the name explicitly to web sockets. This more general approach can be used later on to supply and use an alternative socket pair for other usages. Reviewed By: fabiomassimo Differential Revision: D30482531 fbshipit-source-id: a2c5f25b925c731e7970614b5ed987ce00219918
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ba87b51e92
commit
977cc7598e
@@ -94,4 +94,20 @@ export default (store: Store, _logger: Logger) => {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (process.env.FLIPPER_ALT_PORTS) {
|
||||
const portOverrides = parseFlipperPorts(process.env.FLIPPER_ALT_PORTS);
|
||||
if (portOverrides) {
|
||||
store.dispatch({
|
||||
type: 'SET_ALT_SERVER_PORTS',
|
||||
payload: portOverrides,
|
||||
});
|
||||
} else {
|
||||
console.error(
|
||||
`Ignoring malformed FLIPPER_ALT_PORTS env variable:
|
||||
"${process.env.FLIPPER_ALT_PORTS || ''}".
|
||||
Example expected format: "1111,2222".`,
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user