🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@cloudbase/cli

Package Overview
Dependencies
Maintainers
6
Versions
579
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudbase/cli

## 安装

npmnpm
Version
0.0.1-beta.5
Version published
Weekly downloads
9.9K
17.23%
Maintainers
6
Weekly downloads
 
Created
Source

Cloudbase命令行工具

安装

npm install -g @cloudbase/cli

使用方法

tcb -h
Usage: tcb [options] [command]

Options:
  -V, --version            output the version number
  -h, --help               output usage information

Commands:
  deploy [options] [name]  执行完整的发布
  login                    登录腾讯云账号
  logout                   登出腾讯云账号
  show                     查看状态
  logs [options] <name>    查看日志

发布

执行完整的发布

tcb deploy [--start]

参数:

  • --start:是否需要启动

查看日志

tcb show [-n 20] <name>

参数:

  • -n:日志的行数

tcb.json

cli的配置文件

示例:

{
    "common": {
        "server": {
            "host": "1.2.3.4",
            "username": "root",
            "port": 22,
            "password": "xxxxxxxxxx"
        }
    },
    "deploys": [
        {
            "name": "app",
            "type": "node",
            "path": "./server"
        }
    ]
}

common

包含服务器等通用信息

{
    "common": {
        "server": {
            "host": "1.2.3.4",
            "username": "root",
            "port": 22,
            "password": "xxxxxxxxxx"
        }
    }
    // ...
}

common.server

云主机信息

common.server.host

云主机 host

common.server.username

云主机用户名,默认为 root

common.server.port

云主机ssh端口号,默认为 22

common.server.password

云主机密码

deploys

数组,包含项目的发布配置

示例:

{
    "deploys": [
        // 云函数示例
        {
            "name": "add",
            "type": "function",
            "path": "./",
            "envId": "test-e48fe1",
            "override": true
        },

        // Node服务示例
        {
            "name": "app",
            "type": "node",
            "path": "./server"
        },

        // Vemo项目示例
        {
            name: 'my-vemo',
            type: 'node',
            path: './vemo-server'
        }
    ]
}

FAQs

Package last updated on 23 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts