DEV Community

karleeov
karleeov

Posted on

Deploying your WeChat Mini Program

1. Prerequisites

Before you begin, ensure you have the following:

  • WeChat DevTools: You'll need to have the WeChat DevTools installed on your computer.
  • WeChat Public Platform Account: You need an account on the WeChat Public Platform where you have registered your Mini Program and obtained an AppID.

2. Project Setup in WeChat DevTools

  1. Open WeChat DevTools.
  2. Import your project by selecting the /Users/karlli/WeChatProjects/miniprogram-1/ directory.
  3. The DevTools will automatically read your file. I can see you already have an appid (wxb1ba2df52e01d6f5) configured in this file. Please ensure this is the correct AppID for the Mini Program you want to deploy.

3. Deploying Cloud Functions

Your project uses Cloud Functions, which are located in the directory. These functions need to be deployed to the cloud environment associated with your AppID.

  1. In the WeChat DevTools, open the "Cloud Development" panel.
  2. You will see a list of your cloud functions (analytics, ocr-process, pdf-upload, question-generate).
  3. For each function, you need to upload and deploy it:
    • Right-click on the function's folder (e.g., ).
    • Select "Upload and Deploy". This will install any dependencies listed in the function's package.json and deploy the function to the server.

4. Uploading Your Mini Program

Once your Cloud Functions are deployed, you can upload your Mini Program code.

  1. In the top right corner of the WeChat DevTools, click the "Upload" button.
  2. You will be prompted to enter a version number (e.g., 1.0.0) and a project description.
  3. Click "Upload". This will package your Mini Program code from the directory and upload it to the WeChat Public Platform.

5. Submitting for Review and Release

After a successful upload, the final steps are done on the WeChat Public Platform website.

  1. Log in to the WeChat Public Platform.
  2. Navigate to "Manage" > "Version Management" (管理 > 版本管理).
  3. You will see the version you just uploaded in the "Development Version" (开发版本) list.
  4. You can select this version and submit it for review (提交审核). You may need to provide additional information about your Mini Program during this step.
  5. The review process can take a few hours to a couple of days. Once approved, you can go back to the Version Management page and click "Release" (发布) to make your Mini Program available to all WeChat users.

By following these steps, you should be able to successfully deploy your WeChat Mini Program.

Deploying your WeChat Mini Program involves a few key steps, from setting up your development environment to submitting your application for review. Here is a step-by-step guide based on your project's structure:

1. Prerequisites

Before you begin, ensure you have the following:

  • WeChat DevTools: You'll need to have the WeChat DevTools installed on your computer.
  • WeChat Public Platform Account: You need an account on the WeChat Public Platform where you have registered your Mini Program and obtained an AppID.

2. Project Setup in WeChat DevTools

  1. Open WeChat DevTools.
  2. Import your project by selecting the /Users/karlli/WeChatProjects/miniprogram-1/ directory.
  3. The DevTools will automatically read your file. I can see you already have an appid (wxb1ba2df52e01d6f5) configured in this file. Please ensure this is the correct AppID for the Mini Program you want to deploy.

3. Deploying Cloud Functions

Your project uses Cloud Functions, which are located in the directory. These functions need to be deployed to the cloud environment associated with your AppID.

  1. In the WeChat DevTools, open the "Cloud Development" panel.
  2. You will see a list of your cloud functions (analytics, ocr-process, pdf-upload, question-generate).
  3. For each function, you need to upload and deploy it:
    • Right-click on the function's folder (e.g., ).
    • Select "Upload and Deploy". This will install any dependencies listed in the function's package.json and deploy the function to the server.

4. Uploading Your Mini Program

Once your Cloud Functions are deployed, you can upload your Mini Program code.

  1. In the top right corner of the WeChat DevTools, click the "Upload" button.
  2. You will be prompted to enter a version number (e.g., 1.0.0) and a project description.
  3. Click "Upload". This will package your Mini Program code from the directory and upload it to the WeChat Public Platform.

5. Submitting for Review and Release

After a successful upload, the final steps are done on the WeChat Public Platform website.

  1. Log in to the WeChat Public Platform.
  2. Navigate to "Manage" > "Version Management" (管理 > 版本管理).
  3. You will see the version you just uploaded in the "Development Version" (开发版本) list.
  4. You can select this version and submit it for review (提交审核). You may need to provide additional information about your Mini Program during this step.
  5. The review process can take a few hours to a couple of days. Once approved, you can go back to the Version Management page and click "Release" (发布) to make your Mini Program available to all WeChat users.

By following these steps, you should be able to successfully deploy your WeChat Mini Program.

Top comments (0)