Real-computer testing on mobile Web development

Source: Internet
Author: User

May has been more than half, the mood is not very good, because too sleepy no state, so just went to run a few laps, the mood finally not so depressed, come on, today to record is in the mobile page when the real machine test.

There are a lot of methods on the Internet, I have enough to master one < Bay stretched out >

Browsersync allows the PC, the page on the mobile side to respond to file changes in real time, without refreshing the operation. Also, when you perform a click on a device, the behavior is synced to other browsers as well.

"1" Installation

Browsersync is based on Nodejs, so make sure your computer is installed Nodejs before installing it. About NODEJSDE installation do not want to wordy, because too many things are based on Nodejs installation good.

The Nodejs installation is complete before the simple setup of the Browsersync is started, including installation and monitoring

<1>browsersync Installation

Open the terminal window and enter

NPM install-g Browser-sync

Wait a moment and the installation is successful.

<2>browsersync Monitoring

Enter your project path, the files path is relative to the current path, and if you need to listen to multiple types of files, you need to separate them with commas.

Browser-sync start--server--files "css/*.css,js/*.js,*.html"

<3> Mobile-side settings

If you use the mobile side first to ensure that mobile devices and desktop devices on the same LAN (with a computer to open 360 wireless WiFi, and then mobile phone wift computer). The address displayed on the terminal of the mobile phone: http://192.168.1.0.245:3000, the actual situation according to their own terminal display.

That's all.

Real-computer testing on mobile Web development

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.