LoginSignup
1
2

More than 3 years have passed since last update.

ngrokについて

Posted at

ngrokとは

ローカルWebサーバーをインターネットに公開出来るサービスです。
デプロイをしていなくとも ngrok を通して作ったサービスを公開できる。
( デモサイトを試す時なんかに使えます )
HTTP/HTTPS 通信だけではなくSSHでも外部から接続できる。
image.png
画像参考: ngrokの利用方法

使い方

①インストール

 brew install ngrok

上記でダメだった場合 brew cask install ngrok

②起動

ngrok http 80

上記コマンドを入力すると

ngrok by @inconshreveable

Tunnel Status                 online
Version                       2.3.35
Web Interface                 http://127.0.0.1:4040
Forwarding                    http://92832de0.ngrok.io -> localhost:80
Forwarding                    https://92832de0.ngrok.io -> localhost:80

Connnections                  ttl     opn     rt1     rt5     p50     p90
                              0       0       0.00    0.00    0.00    0.00

UIが表示され
Web Interface → トンネルのパブリックURL
Forwarding  → トンネルを介して行われた接続に関するその他のステータス
このForwardingで表示されたURLにアクセスすればOKとなります。

SSL認証までをngrolが肩代わりしてくれていますので公開エンドポイントまでSSL通信が可能です。

すごく便利ですね:relaxed:

参考

https://qiita.com/hirokisoccer/items/7033c1bb9c85bf6789bd
https://qiita.com/mininobu/items/b45dbc70faedf30f484e

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2