Skip to content
This repository was archived by the owner on Jul 31, 2020. It is now read-only.

Comments

allow connecting to custom server#46

Closed
saadataz wants to merge 1 commit intomasterfrom
feature/allow-custom-server-url
Closed

allow connecting to custom server#46
saadataz wants to merge 1 commit intomasterfrom
feature/allow-custom-server-url

Conversation

@saadataz
Copy link

To facilitate development, allow specifying server URL in basic example

@kateract
Copy link
Contributor

Not sure how this facilitates development, rather encourages incorrect behavior I would think. This capability was specifically removed a few commits ago in favor of an automatic (and preferred) method.

client.open({
authToken: process.argv[2],
versionId: parseInt(process.argv[3], 10),
url: process.argv[4] || null,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd rather not push 'weirdness' to a public example for functionality that's only useful for internal testing.

@ProbablePrime
Copy link
Contributor

Ahh we nuked this when i added endpoint discovery. Yeah it shouldn't be in the examples in our master branch

return super.open({
authToken: options.authToken,
url: endpoints[0].address,
url: options.url || endpoints[0].address,
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably avoid the external HTTP call here.

if(options.url) { proimse.resolve().then(....)

maybe?

Copy link
Contributor

@connor4312 connor4312 May 18, 2017

Choose a reason for hiding this comment

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

Well, actually. Running the standalone service it exposes a "fake" discovery endpoint which discovers itself. So alternately the option could be passed as an API base URL, which could be reused later if, for example, shortcode OAuth support is integrated into the library. (The standalone tetrisd service also exposes fake shortcode endpoints)

@ProbablePrime
Copy link
Contributor

@kateract specifically. Internal beam developers can run a copy of our interactive service locally. This would be a 122.0.0.1 address. This let's developers connect to those local copies.

@kateract
Copy link
Contributor

@ProbablePrime sorry, I didn't realize he was on your team, but the internal wording makes more sense now.

@ProbablePrime
Copy link
Contributor

@saadataz I'll take over ownership of this and get it done, I'm more familiar with the requirements thanks!

@ProbablePrime ProbablePrime self-assigned this Jun 7, 2017
@ProbablePrime
Copy link
Contributor

I am now closing this as its goals are covered in #69

@ProbablePrime ProbablePrime deleted the feature/allow-custom-server-url branch June 9, 2017 10:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants