Skip to content

Create run export and an example#1

Open
ddimaria wants to merge 2 commits intomasterfrom
feature/run-relay-daemon
Open

Create run export and an example#1
ddimaria wants to merge 2 commits intomasterfrom
feature/run-relay-daemon

Conversation

@ddimaria
Copy link

Add execa directly to the repository and export functions to configure and run the relay daemon directly from the repository instead of writing glue code in js-libp2p or interop.

  • Create a run export that runs the relay daemon
  • Create an example
  • Create a README

@ddimaria ddimaria requested a review from ckousik December 21, 2022 23:40

const RELAY_STARTUP_TIMEOUT = Number(process.env.RELAY_STARTUP_TIMEOUT || 30000)

const run = async (configPath, identityPath) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we make both configPath and identityPath optional?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Certainly. Is this a reasonable default (pulled from ipfs test utils)?

{
  "RelayV1": {
    "Enabled": false
  },
  "RelayV2": {
    "Enabled": true
  },
  "Network": {
    "ListenAddrs": ["/ip4/127.0.0.1/tcp/24222/ws"],
    "AnnounceAddrs": ["/ip4/127.0.0.1/tcp/24222/ws"]
  },
  "Daemon": {
    "PprofPort": -1
  }
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I implemented the above, let me know if you'd like anything changed @ckousik.

@ddimaria ddimaria requested a review from ckousik December 22, 2022 19:47
@ddimaria
Copy link
Author

ddimaria commented Jan 3, 2023

@ckousik good to merge this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants