refactor(electron): change IPFS API port to 50019

This commit is contained in:
Esteban Abaroa
2024-12-07 17:35:47 +00:00
parent 789c54229a
commit 51fc8c899e
4 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -69,10 +69,10 @@ const startIpfs = async () => {
});
// use different port with proxy for debugging during env
let apiAddress = '/ip4/127.0.0.1/tcp/5001';
let apiAddress = '/ip4/127.0.0.1/tcp/50019';
if (isDev) {
apiAddress = apiAddress.replace('5001', '5002');
proxyServer.start({ proxyPort: 5001, targetPort: 5002 });
apiAddress = apiAddress.replace('50019', '50029');
proxyServer.start({ proxyPort: 50019, targetPort: 50029 });
}
await spawnAsync(ipfsPath, ['config', 'Addresses.API', apiAddress], { env, hideWindows: true });
@@ -116,7 +116,7 @@ const start = async () => {
}
pendingStart = true;
try {
const started = await tcpPortUsed.check(isDev ? 5002 : 5001, '127.0.0.1');
const started = await tcpPortUsed.check(isDev ? 50029 : 50019, '127.0.0.1');
if (started) {
return;
}