All Projects → serverless-components → Tencent Website

serverless-components / Tencent Website

Licence: mit
Easily deploy serverless websites (e.g. Vue.js, React, static) to Tencent Cloud with the Serverless Framework

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Tencent Website

apijson-framework
腾讯 APIJSON 服务端框架,通过数据库表配置角色权限、参数校验等,简化使用。Tencent APIJSON Server Framework for configuring access of roles and validation of arguments in database tables, then using APIJSON easier.
Stars: ✭ 41 (-35.94%)
Mutual labels:  tencent
qqmessageoutput
安卓QQ聊天记录导出
Stars: ✭ 100 (+56.25%)
Mutual labels:  tencent
Ocbarrage
iOS 弹幕库 OCBarrage, 同时渲染5000条弹幕也不卡, 轻量, 可拓展, 高度自定义动画, 超高性能, 简单易上手; A barrage render-engine with high performance for iOS. At the same time, rendering 5000 barrages is also very smooth, lightweight, scalable, highly custom animation, ultra high performance, simple and easy to use!
Stars: ✭ 589 (+820.31%)
Mutual labels:  tencent
xinge
腾讯信鸽push Golang lib
Stars: ✭ 25 (-60.94%)
Mutual labels:  tencent
TUICalling
腾讯云TRTC针对直播、语聊、视频通话等推出的低代码解决方案~
Stars: ✭ 28 (-56.25%)
Mutual labels:  tencent
Wafer2 Node Sdk
Wafer2 SDK for Node.js
Stars: ✭ 270 (+321.88%)
Mutual labels:  tencent
tencent-scf
Deploy Tencent Cloud Serverless Cloud Function in seconds with Serverless Components.
Stars: ✭ 86 (+34.38%)
Mutual labels:  tencent
Tencent Now
🔥🔥🔥iOS视频直播:仿腾讯旗下 < NOW > 直播 斗鱼 抖音 火山视频 花椒 熊猫 YY 陌陌 映客 直播APP iOS Live video
Stars: ✭ 762 (+1090.63%)
Mutual labels:  tencent
tencent-ai
腾讯AI开放平台 【Tencent AI open platform】
Stars: ✭ 68 (+6.25%)
Mutual labels:  tencent
Selenium Geetest Crack
selenium破解滑动验证码
Stars: ✭ 418 (+553.13%)
Mutual labels:  tencent
cordova-plugin-tencent-liteav
A cordova plugin for video playing with Tencent's LiteAV SDK. Support RTMP/HLS/FLV/MP4.
Stars: ✭ 24 (-62.5%)
Mutual labels:  tencent
serverless-tencent-scf
Add support for Tencent Cloud's serverless infrastructure to the Serverless Framework via this plugin
Stars: ✭ 53 (-17.19%)
Mutual labels:  tencent
Ocbarrage
iOS 弹幕库 OCBarrage, 同时渲染5000条弹幕也不卡, 轻量, 可拓展, 高度自定义动画, 超高性能, 简单易上手; A barrage render-engine with high performance for iOS. At the same time, rendering 5000 barrages is also very smooth, lightweight, scalable, highly custom animation, ultra high performance, simple and easy to use!
Stars: ✭ 294 (+359.38%)
Mutual labels:  tencent
ELFChatBot
闲聊QQ机器人,也就是人工智障
Stars: ✭ 61 (-4.69%)
Mutual labels:  tencent
Musicdl
A lightweight music downloader written by pure python.
Stars: ✭ 641 (+901.56%)
Mutual labels:  tencent
tencent-tensorflow-scf
A template project for serverless functions for Tensorflow inference on Tencent Cloud.
Stars: ✭ 38 (-40.62%)
Mutual labels:  tencent
tencent-cam-role
Easily provision Tencent CAM roles using Serverless Components
Stars: ✭ 19 (-70.31%)
Mutual labels:  tencent
Tencentsig
😜golang 原生支持的 腾讯云 usersig 生成库
Stars: ✭ 14 (-78.12%)
Mutual labels:  tencent
Mtrans
Multi-source Translation
Stars: ✭ 711 (+1010.94%)
Mutual labels:  tencent
Translators
🌏🌍🌎Translators🌎🌍🌏 is a library which aims to bring free, multiple, enjoyable translation to individuals and students in Python. Translators是一个旨在用Python为个人和学生带来免费、多样、愉快翻译的库。
Stars: ✭ 295 (+360.94%)
Mutual labels:  tencent

Serverless Components


腾讯云 Website 静态网站组件 ⎯⎯⎯ 通过使用 Tencent Serverless Framework,基于云上 Serverless 服务(如对象存储等),实现“0”配置,便捷开发,极速部署你的静态网站,Website 静态网站组件支持丰富的配置扩展,如自定义域名和 CDN 加速等。提供了目前最易用、低成本并且弹性伸缩的静态站点开发和托管能力。

特性介绍:

  • [x] 按需付费 - 按照请求的使用量进行收费,没有请求时无需付费
  • [x] "0"配置 - 只需要关心项目代码,之后部署即可,Serverless Framework 会搞定所有配置。
  • [x] 极速部署 - 仅需几秒,部署你的静态网站。
  • [x] 实时日志 - 通过实时日志的输出查看业务状态,便于直接在云端开发应用。
  • [x] 便捷协作 - 通过云端的状态信息和部署日志,方便的进行多人协作开发。
  • [x] CDN 加速,SSL 证书配置和自定义域名 - 支持配置 CDN 加速,支持自定义域名及 HTTPS 访问

快速开始:

  1. 安装
  2. 创建
  3. 部署
  4. 配置
  5. 开发调试
  6. 查看状态
  7. 移除
  8. 账号配置(可选)

 

1. 安装

通过 npm 安装最新版本的 Serverless Framework

$ npm install -g serverless

2. 创建

通过如下命令,快速创建一个静态网站托管应用

$ serverless init website-starter --name example
$ cd example

下载完毕后,目录结构如下所示:

|- src
|   └── index.html
└──  serverless.yml

src 目录中既可以托管简单的 html 文件,也可以托管完整的 React/Vue 的应用。

3. 部署

serverless.yml 文件下的目录中运行如下命令进行静态网站的部署。部署完毕后,你可以在命令行的输出中查看到你静态网站的 URL 地址,点击地址即可访问网站托管的链接。

$ serverless deploy

如您的账号未登陆注册腾讯云,您可以直接通过微信扫描命令行中的二维码进行授权登陆和注册。

如果希望查看更多部署过程的信息,可以通过sls deploy --debug 命令查看部署过程中的实时日志信息,slsserverless 命令的缩写。


4. 配置

静态网站组件支持 0 配置部署,也就是可以直接通过配置文件中的默认值进行部署。但你依然可以修改更多可选配置来进一步开发该静态网站项目。

以下是静态网站 Website 组件的 serverless.yml部分配置说明:

# serverless.yml

component: website # (必填) 引用 component 的名称,当前用到的是 tencent-website 组件
name: websitedemo # (必填) 该 website 组件创建的实例名称
app: websiteApp # (可选) 该 website 应用名称
stage: dev # (可选) 用于区分环境信息,默认值是 dev

inputs:
  src:
    src: ./src
    index: index.html
    # dist: ./dist
    # hook: npm run build
    # websitePath: ./
  region: ap-guangzhou
  bucketName: my-bucket
  protocol: https

点此查看全量配置及配置说明

当你根据该配置文件更新配置字段后,再次运行 serverless deploy 或者 serverless 就可以更新配置到云端。

5. 开发调试

部署了静态网站应用后,可以通过开发调试能力对该项目进行二次开发,从而开发一个生产应用。在本地修改和更新代码后,不需要每次都运行 serverless deploy 命令来反复部署。你可以直接通过 serverless dev 命令对本地代码的改动进行检测和自动上传。

可以通过在 serverless.yml文件所在的目录下运行 serverless dev 命令开启开发调试能力。

serverless dev 同时支持实时输出云端日志,每次部署完毕后,对项目进行访问,即可在命令行中实时输出调用日志,便于查看业务情况和排障。

6. 查看状态

serverless.yml文件所在的目录下,通过如下命令查看部署状态:

$ serverless info

7. 移除

serverless.yml文件所在的目录下,通过以下命令移除部署的静态网站 Website 服务。移除后该组件会对应删除云上部署时所创建的所有相关资源。

$ serverless remove

和部署类似,支持通过 sls remove --debug 命令查看移除过程中的实时日志信息,slsserverless 命令的缩写。

账号配置

当前默认支持 CLI 扫描二维码登录,如您希望配置持久的环境变量/秘钥信息,也可以本地创建 .env 文件

$ touch .env # 腾讯云的配置信息

.env 文件中配置腾讯云的 SecretId 和 SecretKey 信息并保存

如果没有腾讯云账号,可以在此注册新账号

如果已有腾讯云账号,可以在API 密钥管理中获取 SecretIdSecretKey.

# .env
TENCENT_SECRET_ID=123
TENCENT_SECRET_KEY=123

License

MIT License

Copyright (c) 2020 Tencent Cloud, Inc.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].