Create serverless.yml

This commit is contained in:
Tinafang
2020-11-13 18:45:18 +08:00
committed by GitHub
parent 7d54864f73
commit bfd9eb0135

24
serverless.yml Normal file
View File

@@ -0,0 +1,24 @@
# serverless.yml
#组件信息
component: scf # (必选) 组件名称在该实例中为scf
name: jdscript # (必选) 组件实例名称。
#组件参数配置
inputs:
name: scf-${name} # 云函数名称,默认为 ${name}-${stage}-${app}
enableRoleAuth: true # 默认会尝试创建 SCF_QcsRole 角色,如果不需要配置成 false 即可
src: ./
handler: index.main_handler #入口
runtime: Nodejs12.16 # 运行环境 默认 Nodejs10.15
region: ap-guangzhou # 函数所在区域
description: This is a function in ${app} application.
memorySize: 64 # 内存大小单位MB
timeout: 900 # 超时时间,单位秒
events: # 触发器
- timer: # 定时触发器
parameters:
# name: timer # 触发器名称默认timer-${name}-${stage}
cronExpression: "0 0 0 */1 * * *" # 每天零点执行一次
enable: true
argument: argument # 额外的参数