Home > WeChat Applet > WeChat Development > WeChat development can debug the interface locally

WeChat development can debug the interface locally

Y2J
Release: 2017-05-05 10:33:04
Original
1584 people have browsed it

Foreword:

This article summarizes some quick steps taken to facilitate development when developing WeChat interfaces, which has saved developers difficult development time and improved development efficiency.

Local test:

(Reminder, comment out the verification parameters when simulating WeChat get or post data locally)

Use WeChat simulator weixinPost to simulate sending xml Data

Since this software was released when WeChat did not disclose the high-level interface, so for the debugging of the high-level interface, the author used Fiddler, a packet capture tool, to simulate the post data

High-end test:

Use the reverse proxy software ngrok to access local projects:

ngrok is a reverse proxy that establishes a ## between a public endpoint and a locally running Web server. #Secure channel. (Wikipedia and Baidu Encyclopedia have no explanation for this software yet)

The author uses windows as an example to explain:

1. Software download address: ngrok. com/download

2. Register an account on the website to obtain authtoken

After successful registration, below:

The author placed the downloaded ngrok on the d drive

Next, enter the cmd command into ngrok

The following interface will appear, indicating that the authtoken setting is successful. Press CTRL+C to return:

Next, enter the following command line to set the domain name prefix mynawechat:

After the setting is successful, the display is as follows

The test in the project is as follows:

The test is successful! ! !

In this way, you can directly access the local project when developing

WeChat project, eliminating the time-consuming step of copying the running project to the server and then restarting the service on the server. .

【Related recommendations】

1.

WeChat public account platform source code download

2.

Alizi order system source code

The above is the detailed content of WeChat development can debug the interface locally. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template