WeChat applet development, database table creation, and custom cloud environments

Table of Contents

1. After entering the applet, click “Cloud development” to open the cloud development function.


2. After enabling the cloud development function, you will enter the cloud development console, click the database in the upper left corner, and then click the “+” below to generate a spreadsheet. Randomly take the table name, just be happy, my watch is called TestDatabase.


3. After creating the schedule, click “+ Add Record” on the right, the pop-up window will appear. This window is a pop-up window to fill in the field you need. I see you, you need to specify the field name, field type and value.


4. Only one piece of data can be generated at a time, and the field name and type of each piece of data must be the same. After creation, each data will contain another “_id” field. This is a cloud development database that automatically adds you and can also change its value, but the _ID of each data must be unique.



5. So the database table for development and creation of clouds is ok. Don’t forget to add the specified cloud environment to App.js from the program applet before accessing the database (when calling cloud functions, databases, storage, cloud storage and other APIs, you need to specify the specific cloud ID, which is required to visit

      Env: 'xxx' // идентификатор среды развития облаков

6. Where can I see the Cloud ID? Click Settings in the upper right corner of the cloud development console, you can see the cloud environment. The newly discovered feature of cloud development is that the system has configured one of the system defaults. You can also create multiple cloud environments. This is free traffic for us. As a rule, small companies or individuals will suffice. After choosing the environment name, copy the environment identifier to app.js, and finally write the code to call the database.


Leave a Comment