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

Add documentation about @NgrokComponent #49

Open
juherr opened this issue Apr 6, 2021 · 2 comments
Open

Add documentation about @NgrokComponent #49

juherr opened this issue Apr 6, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@juherr
Copy link
Contributor

juherr commented Apr 6, 2021

Hi,

Thanks for your starter which is working well 👍
Sadly, there is missing some documentation about @NgrokComponent.

For example, I had to dig into the sources in order to find how to find the publicUrl.

The solution is quite easy but undocumented:

    @Autowired 
	private NgrokApiClient ngrok;

	...
	String publicUrl = ngrok.fetchTunnels().first { it.proto == "http" }.publicUrl
@kilmajster
Copy link
Owner

Hi @juherr 😃 thanks for pointing this out. I am planning to extend this bean to cover all ngrok API methods (and then create some serious documentation). I can image that accessing public ngrok URL in most cases is all what user want to do with API so for now in v0.3.4 I added getters for public http and https URLs, please check https://github.com/kilmajster/ngrok-spring-boot-starter#ngrok-api

@juherr
Copy link
Contributor Author

juherr commented Apr 6, 2021

Awesome 👍

returns http(s) tunnel URL or null in case ngrok is not running

It is opinionated, but I think an exception will be better than null because you are not supposed to call it if not running.
Maybe you'll have to add something like boolean isRunning() too.

@kilmajster kilmajster added the enhancement New feature or request label Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants