LoginSignup
4
6

More than 5 years have passed since last update.

ngrokの使い方

Posted at

ngrokとは?

ngrok公式サイトに書いてある通り、ローカルのサーバを外部に公開するツールです。

詳しくは公式サイト見てください。

導入方法

まずはSIGN UPからアカウント登録をします。

その後、ダウンロード方法が表示されます。

そこから落としてもいいんですが、面倒なのでbrewで入れちゃいます。

zsh
brew install ngrok

人によってはbrewでは出来ないときもあるので、その場合は brew cask で入れます。

zsh
brew cask install ngrok

その後、先程作成したアカウントと接続し使えるようにします。

ngrok authtoken authトークン: ngrokのダッシュボードにある
Authtoken saved to configuration file: /Users/mimikun/.ngrok2/ngrok.yml

使い方

共有したいものが使っているポート番号を指定し、実行します。

railsのプロジェクトだったら3000番ポートとか。

ngrok http 3000
4
6
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
4
6