Sometimes you need to test some functionality on mobile device but from the website which is running on your laptop. There is a simple solution - SOCAT.
DDEV is a great tool for local development and currently I'm using it on some of projects. It has internal command to share website over internet with ngrok https://ngrok.com/

But it's not the case for local development. There is simplier:
Install socat. I have "socat version 1.7.4.1 on Feb  4 2021 12:53:19"

sudo apt install socat

Then check your internal IP:

ipconfig

run website and check it's port

ddev start
ddev status

run socat
socat tcp-listen:PORT_LISTEN,reuseaddr,fork tcp:localhost:PORT_WEBSITE

something lke that

socat tcp-listen:8181,reuseaddr,fork tcp:localhost:49259

And here you go, open web browser on mobile and goto:
http://YOU_DDEV_IP:PORT_LISTEN

http://192.168.10.1:8181

Коментувати

Вміст цього поля є приватним і не буде доступний широкому загалу.
  • Не дозволено жодних HTML теґів.
CAPTCHA
   .oooo.                 oooo                          .ooo     .ooooo.   
.dP""Y88b `888 .88' d88' `8.
]8P' oooo ooo 888 ooo. .oo. .oo. d88' Y88.. .8'
<88b. `88. .8' 888 `888P"Y88bP"Y88b d888P"Ybo. `88888b.
`88b. `88..8' 888 888 888 888 Y88[ ]88 .8' ``88b
o. .88P `888' 888 888 888 888 `Y88 88P `8. .88P
`8bd88P' .8' o888o o888o o888o o888o `88bod8' `boood8'
.o..P'
`Y8P'
Уведіть код, зображений у стилі Ascii-Арт.
Мета цього запитання — довести, що ви є реальним відвідувачем і запобігти автоматизованим розсиланням спаму.