Build a debug local test environment for the WeChat public platform and set up the Public

Source: Internet
Author: User

Build a local testing environment for the public platform that can be debugged and set up the Public
Background:

Recently, I was preparing a collaborative development open-source project NWechat. Before the project began, I had to prepare several items.

1) Select the project management system;

2) Select the source code version control system;

3) Build the development environment.

4) team building.

Building a development environment is one of the several things to do before the project starts.

I. The problem is:

During development, you must enter a URL, which must be an Internet domain name.

This creates a problem. We cannot test the code in the development environment, let alone debug the code.

2. This is what we do.

I have asked some developers about the solutions they are using:

1) Build a test server.

After coding in the development environment, submit it to the test server for testing.

2) simulate public platform APIs in the development environment.

Use simulators, Fiddler, and other tools to simulate requests or responses to public platform APIs.

3) Build a server on the machine in the development environment and direct the published website directory to the development project directory.

(In fact, it is a variant of solution 1, which reduces the process of submitting code to the test server ).

3. NWechat Team does this 1. from localhost to 127.0.0.1

1) run your web project, find IIS Express in the task tray in the lower right corner, right-click the pop-up menu, and click "show all applications ".

2) Click the website name in the pop-up interface, and then click the configuration file path to open the configuration file.

3) locate the site node of the corresponding project under sites, locate the corresponding website under the bingdings subnode, change localhost to 127.0.0.1, and save and exit.

4) Disable VS2013 and start it as an administrator.

5) Modify project properties

6) Run

2. From 127.0.0.1 to Internet

1) use the text editing tool to open ngrok. bat.

2) Modify ngrok. bat

3) double-click ngrok. bat

4) access through Internet links

3. Configure public platform Interface Information

Now, the local test environment of a debuggable public platform has been set up.

Download related tools

: Https://github.com/hanzhaoxin/NWechat

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.