腾讯云介绍
介绍
云函数
vscode 插件
- vscode 安装
Tencent Serverless Toolkit for VS Code插件
命令行
- 安装
npm i -g serverless-cloud-framework- 查看版本
$ scf -v
serverless-cloud-framework
serverless-cloud-framework version: 1.0.2(npm)- 查看支持的模板
$ scf registry
...
• scf-golang - helloworld 空白模版函数
• scf-php - helloworld 空白模版函数
• scf-python - helloworld 空白模版函数
• scf-nodejs - helloworld 空白模版函数
...- 初始化
scf init scf-nodejs --name my-app或
$ mkdir tmp
$ cd tmp
$ serverless-cloud-framework- 登录
$ scf login
# 登录后查看信息
$ cat .env
TENCENT_APP_ID=125xxx
TENCENT_SECRET_ID=xxx
TENCENT_SECRET_KEY=xxx
TENCENT_TOKEN=xxx- 查看信息
cd demo
scf info- 查看目录结构
$ tree .
.
├── README.md
├── README_EN.md
├── index.js # 入口函数
├── serverless.yml # 配置文件
└── .env # 环境变量文件- 部署
scf deploy- dev 模式
scf dev最近更新
最新评论