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