Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ffMathy committed Feb 22, 2023
2 parents 4dc8e94 + 8ed4965 commit 25bb456
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ services.AddNgrok();
var serviceProvider = services.BuildServiceProvider();
var ngrokService = serviceProvider.GetService<INgrokService>();

//this downloads the Ngrok executable, starts it in
//the background, and opens a tunnel for the given URL
//this downloads the Ngrok executable and starts it in the background.
await ngrokService.InitializeAsync();

//this opens a tunnel for the given URL
var tunnel = await ngrokService.StartAsync(new Uri("http://localhost:80"));
Console.WriteLine("Ngrok tunnel URL for localhost:80 is: " + tunnel.PublicUrl);

Expand Down Expand Up @@ -100,4 +102,4 @@ And you can register a lifetime hook as such:

```csharp
services.AddNgrokLifetimeHook<MyHook>();
```
```

0 comments on commit 25bb456

Please sign in to comment.