Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI enable environment selection #93

Closed
ramzeaslan opened this issue Jan 23, 2017 · 7 comments
Closed

CLI enable environment selection #93

ramzeaslan opened this issue Jan 23, 2017 · 7 comments

Comments

@ramzeaslan
Copy link

ramzeaslan commented Jan 23, 2017

I would like to be able to define what environment the CLI should be working against currently it seems hardcoded to only work with Production env

A good solutions is is an argument which can be set as part of command

so for exmaple to check your balance, you would do :

nexmo balance --host "URL"
18.96 EUR

@ramzeaslan ramzeaslan changed the title CLI enable enviornme CLI enable enviornment selection Jan 23, 2017
@leggetter leggetter changed the title CLI enable enviornment selection CLI enable environment selection Jan 23, 2017
@cbetta
Copy link
Contributor

cbetta commented Jan 23, 2017

@ramzeaslan great idea. Would the host url be a full url, or just a domain, or also a port? Would this url be predictable? If so can we just do nexmo balance --host dev?

@leggetter
Copy link
Contributor

@cbetta I think it'll be a host, probably including scheme e.g. http://internal-api.nexmo.com

@ramzeaslan
Copy link
Author

ramzeaslan commented Jan 24, 2017

@leggetter and @cbetta , I reckon having the full host makes the most sense, otherwise we are restricting ourselves and as such are less future proof.

Another alternative which is worth considering is that as part of the setup of the Nexmo CLI you are required to set your API key and Secret, what if you also set your env as part of the setup?

Thanks

@cbetta
Copy link
Contributor

cbetta commented Jan 24, 2017

@ramzeaslan interesting. Does make things easier to use. Let me think about it.

@leggetter
Copy link
Contributor

It feels like we're moving more towards a per-project config rather than global config that you'll have to change as you move between environments.

IMO Nexmo/nexmo-cli#109 could be a related to this. How nexmo-node enables it is a good question. But this discussion is really related to the CLI rather than nexmo-node.

To enable this we just need to make the host configurable within nexmo-node.

@cbetta
Copy link
Contributor

cbetta commented Jan 24, 2017

I had not even noticed this issue wasn't on the CLI project. Let's close this one and re-open on the CLI library.

@cbetta
Copy link
Contributor

cbetta commented Jan 24, 2017

Closing, have opened Nexmo/nexmo-cli#114 instead.

@cbetta cbetta closed this as completed Jan 24, 2017
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

No branches or pull requests

3 participants