May 20, 2021 WeChat Mini Program Development Document
1. 1. Create a new cloud development template
You can quickly get started with cloud development by following these steps.
You can also omit this step to get cloud development up and into use directly on existing projects.
Select an empty directory for a new project, fill in the AppID (you must fill in the AppID using cloud development capabilities), check Create a "Cloud Development QuickStart Project" and click Create to get a sample applet that demonstrates the fundamental capabilities of cloud development. This small program is different from a normal QuickStart gadget in that it has the following considerations:
Starting with the underlying library 2.4.1, cloud development can be used in small program plug-ins, and when using cloud development in plug-ins, cloud resources are used by the plug-in side rather than the host's cloud resources, in the same way that they are used in small programs.
After you create your first cloud development snr, you need to turn on cloud development before you can use cloud development capabilities. O n the left side of the developer toolbar, click the "Cloud Development" button to open the cloud console, open cloud development as prompted, and create a cloud environment. T wo environments can be created under the default quota, each isolated from the other, each containing separate resources such as database instances, storage space, cloud function configuration, and so on. Each environment has a unique environment ID identity, and the initially created environment automatically becomes the default environment.
Note: After the appid opens the cloud environment, wait for approximately 10 minutes to use the cloud API, during which the official background service is being prepared, if you try to call the cloud API in the applet, Cloud Init Error: {Errmsg: "INVALID Scope"} error
Once to create the creation environment, you can start the partial basic capability presentation of the applet on the simulator.
The Cloud Development Console is where managing cloud development resources, and the console provides the following capabilities:
To destroy the environment, developers can contact us through a ticket. Please refer to the document "Small Programs and Cloud Development Work orders" for the specific way of submitting work orders.