Imagine you're developing a cool responsive website to use with mobile. You have develop some special features like using geolocation or cam qrcode scanner to work well with mobile experience. But how to test those features in local where you just have easily access to your website through your computer.
To achieve this, You can use httpdumper.
Requirements:
- node >= 11.0
- wifi network where your computer with your local website and your mobile are connected together.
Install
$ npm i -g httpdumper
Getting started
- Get your local computer IP
on linux with:
$ /sbin/ifconfig
you should get your local IP for your wifi interface, so something like this by example:
192.168.X.X
- Run httpdumper
If you have your local website running on http://localhost:9000 from your computer. You can just start httpdumper like this:
$ httpdumper --port="3000" --host="http://localhost:9000" --uplaodDir="./uploads/"
- Mobile test
Access your local website from your mobile browser at the address:
http://<your-local-ip>:3000
You will get the log requests in the terminal. If your requests have some files, they will be uploaded in the specified upload directory.
Hope it will be useful for some of you!
:)
Top comments (1)
Hi, you're magic, thank for a tip