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.
- node >= 11.0
- wifi network where your computer with your local website and your mobile are connected together.
$ npm i -g httpdumper
- Get your local computer IP
on linux with:
you should get your local IP for your wifi interface, so something like this by example:
- 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:
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!