Wechat public account development early stage environment construction

 

        This article introduces the preliminary environment preparation for WeChat official account development, including official account application, local test environment construction, etc., and provides introductory guidance for WeChat official account development peers.

        Development environment:

  1. Apply for a WeChat official account (personal application can only be a subscription account, enterprises and organizations can apply for a service account, pass the certification, and obtain the WeChat advanced interface)
  2. External network mapping tool (convenient for local development and debugging)

       The url connected to WeChat must meet the following conditions:

  • accessible on the public network
  • Port only supports port 80

Here I introduce an intranet mapping tool: ngrok, which can map the intranet to the external network, so that we can access our local network services on the public network.

ngrok download address: http://natapp.cn/#about

Usage: Unzip the downloaded file (my unzip is in G:\05_Open Platform\WeChat Public Platform\Environment Building\ngrok_windows), and execute the following commands in the windows command window



 

Among them, myserver is taken by ourselves and used for subsequent access;

Port 8080 is the port of the local application server (tomcat)

Execute this command and see the following results:



 

In this way, we start the application server locally and can access it through http://myserver.ngrok.natapp.cn

My project's local access address: http://localhost:8080/JhEducationWXServer/views/12.12_active_9.9.jsp

Corresponding public network address: http://myserver.ngrok.natapp.cn/JhEducationWXServer/views/12.12_active_9.9.jsp

 

If you have any questions, you can join the WeChat public account development exchange group: 527476695

 

        This article introduces the preliminary environment preparation for WeChat official account development, including official account application, local test environment construction, etc., and provides introductory guidance for WeChat official account development peers.

        Development environment:

  1. Apply for a WeChat official account (personal application can only be a subscription account, enterprises and organizations can apply for a service account, pass the certification, and obtain the WeChat advanced interface)
  2. External network mapping tool (convenient for local development and debugging)

       The url connected to WeChat must meet the following conditions:

  • accessible on the public network
  • Port only supports port 80

Here I introduce an intranet mapping tool: ngrok, which can map the intranet to the external network, so that we can access our local network services on the public network.

ngrok download address: http://natapp.cn/#about

Usage: Unzip the downloaded file (my unzip is in G:\05_Open Platform\WeChat Public Platform\Environment Building\ngrok_windows), and execute the following commands in the windows command window



 

Among them, myserver is taken by ourselves and used for subsequent access;

Port 8080 is the port of the local application server (tomcat)

Execute this command and see the following results:



 

In this way, we start the application server locally and can access it through http://myserver.ngrok.natapp.cn

My project's local access address: http://localhost:8080/JhEducationWXServer/views/12.12_active_9.9.jsp

Corresponding public network address: http://myserver.ngrok.natapp.cn/JhEducationWXServer/views/12.12_active_9.9.jsp

 

If you have any questions, you can join the WeChat public account development exchange group: 527476695

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327082296&siteId=291194637