发布到阿里云 FC
配置
在项目根目录的 f.yml
的 provider
段落处确保为 aliyun
。
service:
name: midway-faas-examples
provider:
name: aliyun
部署
部署函数,直接使用发布命令即可打包并部署函数,Deploy 命令会自动打包,并调用阿里云官方部署工具发布。
$ npm run deploy
信息
如果输错了信息,可以重新执行 npx midway-bin deploy --resetConfig
修改。
阿里云部署首次需要配置 accountId
、accountKey
、accountSecret

相关配置获取,可参照下方图片:

点击此处跳转阿里云安全设置页。

点击跳转阿里云个人 AccessKey 页面。
发布后,阿里云会输出一个临时可用的域名,打开浏览器访问即可。

常见问题
请查询 阿里云发布 FAQ。