4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

serveoがすごい。ngrokから切り替えた話

Last updated at Posted at 2019-08-02

この記事を発見して、ちょっと試してみました。
https://qiita.com/kaba/items/53b297e2bfb5b4f20a48

serveoを一応確認する
ふむふむ、ムズカシクない。

ngrokの場合

インストール

下記のコマンドを実行する。

$ brew install ngrok

上記のコマンドでダメだった場合

$ brew cask install ngrok

※私はこちらでした。

ngrokを実行

ngrokの後にローカルで起動しているページのポート番号を入れ起動する。

$ ngrok http 3001

実行して下記様な文字が出れば起動成功。

ngrok by @inconshreveable                                                                                              (Ctrl+C to quit)
                                                                                                                                       
Session Status                online                                                                                                   
Account                       varutane (Plan: Free)                                                                                    
Update                        update available (version 2.3.34, Ctrl-U to update)                                                      
Version                       2.2.8                                                                                                    
Region                        United States (us)                                                                                       
Web Interface                 http://127.0.0.1:4040                                                                                    
Forwarding                    http://99999999.ngrok.io -> localhost:3001                                                               
Forwarding                    https://99999999.ngrok.io -> localhost:3001                                                              
                                                                                                                                       
Connections                   ttl     opn     rt1     rt5     p50     p90                                                              
                              0       0       0.00    0.00    0.00    0.00                

外部からのアクセス

https://99999999.ngrok.io でアクセスできる

serveoの場合

起動する

$ ssh -R 80:localhost:3001 serveo.net

Forwarding HTTP traffic from https://sequax.serveo.net
Press g to start a GUI session and ctrl-c to quit.

いざ!アクセス

https://sequax.serveo.net にアクセスしてみる

HTTP request from xxx.xxx.xxx.xxx to https://sequax.serveo.net/
HTTP request from xxx.xxx.xxx.xxx to https://sequax.serveo.net/_nuxt/runtime.js
HTTP request from xxx.xxx.xxx.xxx to https://sequax.serveo.net/_nuxt/commons.app.js
HTTP request from xxx.xxx.xxx.xxx to https://sequax.serveo.net/_nuxt/vendors.app.js
HTTP request from xxx.xxx.xxx.xxx to https://sequax.serveo.net/_nuxt/app.js
HTTP request from xxx.xxx.xxx.xxx to https://sequax.serveo.net/__webpack_hmr/client
HTTP request from xxx.xxx.xxx.xxx to https://sequax.serveo.net/_nuxt/pages/index.js
HTTP request from xxx.xxx.xxx.xxx to https://sequax.serveo.net/_nuxt/pages/login.js
HTTP request from xxx.xxx.xxx.xxx to https://sequax.serveo.net/favicon.ico
HTTP request from xxx.xxx.xxx.xxx to https://sequax.serveo.net/favicon.ico
HTTP request from xxx.xxx.xxx.xxx to https://sequax.serveo.net/_nuxt/pages/signup.js
HTTP request from xxx.xxx.xxx.xxx to https://sequax.serveo.net/_nuxt/pages/resend_confirmation_email.js
HTTP request from xxx.xxx.xxx.xxx to https://sequax.serveo.net/_nuxt/pages/reset_password.js

結果

dockerとかを使ってスマホ実機からとか確認するときは重宝する
ngrokよりこっちを使おう!

4
4
4

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
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?