localtunnel은 로컬 포트에 공개 URL 을 붙인다 — 배포나 DNS 설정 없이 남에게 보여주거나 외부 콜백(웹훅)을 받을 때.1
app.listen(PORT, async () => {
const tunnel = await localtunnel({
port: PORT,
subdomain: name,
})
})
하지만 너무 느려서 ngrok 쓰는게 현실적일수도 있겠다. -20220917
Footnotes
-
localtunnel README: “localtunnel exposes your localhost to the world for easy testing and sharing! No need to mess with DNS or deploy just to have others test out your changes.” ↩
-
로컬 환경에서 웹훅 테스트를 위해, API 엔드포인트를 만들고 localtunnel이나 ngrok을 사용하기. ↩
charles
- The Android Emulator and Charles Proxy: A Love Story | by Mark Dappollone | Medium
- Is it possible to rewrite a status code with Charles Proxy? - Stack Overflow
fiddler
mitmproxy
- mitmproxy로 iOS 기기의 네트워크 트래픽 살펴보기 :: Outsider’s Dev Story
- Android nougat 이상 emulator에서 mitmproxy 사용하기 | by Jungwook Park | kjcoop | Medium
Footnotes
서버/프론트 구분이 없는 환경일 경우 옛날에는 이렇게 세팅해서 개발. 이미 떠 있는 서버 앞에 프록시를 두고 정적 파일만 직접 감시.1
const bs = require('browser-sync').create()
bs.init({
port: 8081,
https: false,
proxy: 'http://localhost:8080',
serveStatic: [
{
route: '/resources',
dir: 'src/main/webapp/resources',
},
],
files: 'src/main/webapp/resources/**/*',
open: false,
})
Footnotes
-
Browsersync options:
proxy— “Proxy an EXISTING vhost. Browsersync will wrap your vhost with a proxy URL to view your site.” /serveStatic— “Add additional directories from which static files should be served.” /files— “Browsersync can watch your files as you work. Changes you make will either be injected into the page (CSS & images) or will cause all browsers to do a full-page refresh.” ↩