5 通过华为云函数部署
luolongfei edited this page 2022-08-29 10:42:13 +08:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

适用于没有自己服务器的用户。

1、下载云函数版的压缩包

参考 此处 下载需要用到的 zip 压缩包。

2、说明

由于华为云函数需要用身份证实名认证,我没有认证也不打算认证,故我没有华为云函数控制台的画面,欢迎大家补充。这里我只提一点,在华为云函数控制台配置云函数入口的时候需要填写为index.huawei_handler,其它我没什么好说的。

以下内容由 @jwan9714 提供。

3、创建华为云函数

直接访问华为云函数控制台创建云函数: https://console.huaweicloud.com/functiongraph/?region=ap-southeast-1#/serverless/functions/create?packageName=default ,此处选择的区域为香港,可以根据实际需要修改。

创建函数时需要注意入口文件名称为 index.huawei_handler

点我查看文档图片 hw01

创建函数后在配置中按照自己的实际情况填写Freenom账号密码以及通知方式下图示例中为通过邮件通知结果。

点我查看文档图片 hw02

根据实际需要配置触发器,定时执行。

点我查看文档图片 hw03

配置完成后可以手动测试是否部署成功。

点我查看文档图片 hw04