스터디
로컬에서 임시 외부 도메인 생성하기
동쪽바다
2020. 11. 16. 00:08
로컬에서 외부 연동되는 도메인을 사용하고 싶을때
ngrok - secure introspectable tunnels to localhost
@Botto ngrok, probably the best tool I have started to use for my webwork since firebug also great support
ngrok.com
설치
brew cask install ngrok
사용
ngrok http [port number]
8080포트로 url을 생성하고 싶다면
ngrok http 8080
실행후
GET /api/callback 200
ngrok by @inconshreveable (Ctrl+C to quit)
Session Status online
Session Expires 7 hours, 32 minutes
Version 2.3.35
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding http://121b9e39a61f.ngrok.io -> http://localhost:8080
Forwarding https://121b9e39a61f.ngrok.io -> http://localhost:8080
Connections ttl opn rt1 rt5 p50 p90
7 0 0.00 0.00 88.17 176.52
HTTP Requests
-------------
GET /api/callback 200
GET /api/callback 200
GET /api/callback 200
간단 설명
- 세션은 8시간으로 되어있으니 참고. 만료후에 다시 만들면 url이 변경됨.
- 외부에서 http://121b9e39a6cf.ngrok.io 로 접근시 http://localhost:8080 으로 연결
- https도 설정됨.
- http 요청로 로그로 남음.