May 21, 2021 WeChat Mini Program Development Document
Tencent Cloud provides developers with a free development and production environment to build your little programs more conveniently, quickly and reliably.
The service side currently supports both NodeJS and PHP languages, and developers can use developer tools to develop both the service side and small programs.
Open Micro-channel public platform Register and log in to the applet, follow these steps:
Notice:
At this point, you will not display the Tread of the Tencent Cloud through the applet. It is not displayed. The promised state will be synchronized to the WeChat developer tool after the first deployment development environment.
Download and install the latest version WeChat developer tool , Use the micro-program binding micro-signal scan to log in to the developer tool.
1. Turn on the second step-installed WeChat developer tool, click the [Small Program Item] button.
2. Enter the applet appid, the project directory selection one Empty catalog Then select [Establish Tencent Cloud Node.js Start Template], click OK to create a small program project.
3. Install dependence
For local commissioning, it is recommended that you install dependencies locally. You can also skip this step and install the dependency directly online using the "Install Dependency" in the "Tencent Cloud" menu of the developer tool.
Open cmD installation dependency in the directory you just selected:
cd server && npm install
4. Click on the Tencent Cloud icon in the upper right corner of the interface and select Upload Test Code in the menu bar at the drop-down.
5. For the first time, use the recommended use, select Module Upload and check all options, then check Auto-Install Dependency after deployment, click OK to start uploading code. After subsequently modifying the service-side code, it is recommended to choose smart upload, the tool only uploads the modified code.
6. Once the upload code is complete, click on the Details button in the upper right corner, then select Tencent Cloud Status to see the development environment domain name that Tencent Cloud is automatically assigned to you:
7. If the current program is the first time using Tencent cloud program
https://
development environment request domain
client/config.js
the editor, the copied
host
the editor will automatically compile the program, the left simulator window can show the client's Demo in real time:
8. Click "Login" in the emulator and you'll see that "Login is successful", i.e. you can start your other developments for the completion of the opening.
Open the WeChat developer tool installed in the second step and click on the "Small Program Project" button.
Tips: Note that if the current small program has opened the NodeJS environment, you need to click on the tool in the upper right corner of the details button, select Tencent cloud status, click switch language
You can choose to switch language environments in the Tencent cloud management background
Enter the appID of the applet, select an empty directory from the project directory, then select "Build Tencent Cloud PHP Launch Template" and click to determine the project for creating the small program.
Click OK again to enter the developer tool.
Click on the Tencent Cloud icon in the upper right corner of the interface and select Upload Test Code in the menu bar at the drop-down.
Once the upload code is complete, click on the Details button in the upper right corner, and then select Tencent Cloud Status to see the development environment domain name that Tencent Cloud is automatically assigned to you.
Full copy
https://
development environment request domain name, and
client/config.js
in the editor, fill in the
host
domain name in the host and save, after saving the editor will automatically compile the program, the left simulator window can display the client's Demo in real time.
Click Sign in in the emulator and you'll see that "Login was successful", which means you can start your other developments when you're ready to open.
```
Specific documentation for the service side, the client's Demo, and the SDK: