Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/serverless-components/tencent-cdn
Tencent Cloud CDN component.
https://github.com/serverless-components/tencent-cdn
Last synced: 3 months ago
JSON representation
Tencent Cloud CDN component.
- Host: GitHub
- URL: https://github.com/serverless-components/tencent-cdn
- Owner: serverless-components
- License: mit
- Created: 2019-12-05T08:14:44.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-13T09:12:53.000Z (over 4 years ago)
- Last Synced: 2024-10-31T16:37:35.016Z (4 months ago)
- Language: JavaScript
- Size: 97.7 KB
- Stars: 4
- Watchers: 9
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.en.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-serverless-framework - @serverless/tencent-cdn - (组件)
README
# Tencent CDN Component
[简体中文](https://github.com/serverless-components/tencent-cdn/tree/master/README.md) | English
Easily provision Tencent CDN using [Serverless Components](https://github.com/serverless/components).
## Quick start
1. [Install](#1-install)
2. [Create](#2-create)
3. [Configure](#3-configure)
4. [Deploy](#4-deploy)
5. [Remove](#5-Remove)### 1. Install
Install the Serverless Framework:
```bash
$ npm install -g serverless
```### 2. Create
Just create the following simple boilerplate:
```bash
$ touch serverless.yml
$ touch .env # your Tencent api keys
```Add the access keys of a [Tencent CAM Role](https://console.cloud.tencent.com/cam/capi) with `AdministratorAccess` in the `.env` file, using this format:
```
# .env
TENCENT_SECRET_ID=XXX
TENCENT_SECRET_KEY=XXX
```- If you don't have a Tencent Cloud account, you could [sign up](https://intl.cloud.tencent.com/register) first.
Also should goto [CDN Service Page](https://console.cloud.tencent.com/cdn), and open CDN service。
### 3. Configure
```yml
# serverless.ymlcomponent: cdn
name: cdnDemo
org: orgDemo
app: appDemo
stage: devinputs:
area: overseas
domain: abc.com
origin:
origins:
- xxx.cos-website.ap-guangzhou.myqcloud.com
originType: cos
originPullProtocol: http
```- [More configuration](https://github.com/serverless-components/tencent-cdn/tree/master/docs/configure.md)
### 4. Deploy
```bash
$ sls deploy
```
### 5. Remove
```bash
$ sls remove
```### New to Components?
Checkout the [Serverless Components](https://github.com/serverless/components) repo for more information.
## License
MIT License
Copyright (c) 2020 Tencent Cloud, Inc.