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

Export CHALICE_DEV_URL=<url-endpoint> ? #32

Closed
e12e opened this issue Jul 12, 2016 · 3 comments
Closed

Export CHALICE_DEV_URL=<url-endpoint> ? #32

e12e opened this issue Jul 12, 2016 · 3 comments

Comments

@e12e
Copy link

e12e commented Jul 12, 2016

From the readme:

Additionally, the API Gateway endpoints will be shortened to https://endpoint/dev/ for brevity. Be sure to substitute https://endpoint/dev/ for the actual endpoint that the chalice CLI displays when you deploy your API (it will look something like https://abcdefg.execute-api.us-west-2.amazonaws.com/dev/.

Why not let the chalice command-line export/set the URL as an environment variable? It should make scripting a lot easier (right now it would probably be possible to |tail -1 |read URL - but being able to check the exit-code of chalice, and then know that that one can go on with testing http ${CHALICE_DEV_URL} or equivalent might make things even easier?

@e12e
Copy link
Author

e12e commented Jul 12, 2016

Giving this a bit more consideration, perhaps it would be even better to write the url to a file, like .endpoint.dev - or both. Might make it easier to keep abstractions working well cross-platform (perhaps with a sub-command: calice url that simply output the current url end-point?

@jamesls
Copy link
Member

jamesls commented Jul 12, 2016

I think this would be helpful. I think I'll need to rework the .chalice structure internals. I think in general I would like to have some file that tracks all the resources we create for you (in addition to the rest api id and stage so we can return the url to you). That will also help facilitate other commands such as chalice delete (#40) and chalice resources (#11), which I'd like to add.

@jamesls
Copy link
Member

jamesls commented Nov 16, 2016

This has been resolved in #169, which adds a chalice url command that prints the deployed URL to stdout.

@jamesls jamesls closed this as completed Nov 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants