LoginSignup
5
0

More than 3 years have passed since last update.

【備忘録】ngrokの使い方

Posted at

前提条件

ngrokダウンロード済み

使い方

  1. Flaskでローカルサーバー立ち上げ
  2. ngrokを起動
  3. コマンドを打つ ngrok http 5000
  4. ローカルサーバーが外部公開される(下図参照)

image.png

app.py(テスト用コード)
# coding: utf-8

from flask import Flask


app = Flask(__name__)


@app.route('/')
def index():
    return 'ngrok test.'


if __name__ == '__main__':
    app.run(host='127.0.0.1', port=5000)
5
0
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
5
0