{"id":13498595,"url":"https://github.com/serverless-components/tencent-apigateway","last_synced_at":"2025-04-04T15:32:05.914Z","repository":{"id":48360486,"uuid":"215679177","full_name":"serverless-components/tencent-apigateway","owner":"serverless-components","description":"Easily provision Tencent API Gateway using Serverless Components","archived":false,"fork":false,"pushed_at":"2021-10-22T13:47:36.000Z","size":175,"stargazers_count":34,"open_issues_count":1,"forks_count":7,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-20T15:01:32.564Z","etag":null,"topics":["api-gateway","serverless","serverless-framework","tencent","tencent-cloud"],"latest_commit_sha":null,"homepage":"https://www.serverless.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serverless-components.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-17T01:43:48.000Z","updated_at":"2024-10-16T06:53:25.000Z","dependencies_parsed_at":"2022-08-20T05:01:19.666Z","dependency_job_id":null,"html_url":"https://github.com/serverless-components/tencent-apigateway","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-components%2Ftencent-apigateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-components%2Ftencent-apigateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-components%2Ftencent-apigateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-components%2Ftencent-apigateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serverless-components","download_url":"https://codeload.github.com/serverless-components/tencent-apigateway/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247202994,"owners_count":20900888,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-gateway","serverless","serverless-framework","tencent","tencent-cloud"],"created_at":"2024-07-31T21:00:37.522Z","updated_at":"2025-04-04T15:32:00.907Z","avatar_url":"https://github.com/serverless-components.png","language":"JavaScript","funding_links":[],"categories":["组件"],"sub_categories":[],"readme":"# 腾讯云 API 网关组件\n\n## 简介\n\n通过 API 网关组件，可以快速，方便的创建，配置和管理腾讯云的 API 网关产品。\n\n快速开始：\n\n1. [安装](#1-安装)\n2. [配置](#2-配置)\n3. [部署](#3-部署)\n4. [查看状态](#4-查看状态)\n5. [移除](#5-移除)\n\n### 1. 安装\n\n通过 npm 安装最新版本的 Serverless Framework\n\n```bash\n$ npm install -g serverless\n```\n\n### 2. 配置\n\n本地创建 `serverless.yml` 文件，在其中进行如下配置\n\n```bash\n$ touch serverless.yml\n```\n\n```yml\n# serverless.yml\n\norg: orgDemo\napp: appDemo\nstage: dev\ncomponent: apigateway\nname: apigwDemo\n\ninputs:\n  region: ap-guangzhou\n  protocols:\n    - http\n    - https\n  serviceName: serverless\n  environment: release\n  endpoints:\n    - path: /\n      protocol: HTTP\n      method: GET\n      apiName: index\n      function:\n        functionName: myFunction\n```\n\n点此查看[全量配置及配置说明](https://github.com/serverless-components/tencent-apigateway/tree/master/docs/configure.md)\n\n### 3. 部署\n\n如您的账号未[登陆](https://cloud.tencent.com/login)或[注册](https://cloud.tencent.com/register)腾讯云，您可以直接通过`微信`扫描命令行中的二维码进行授权登陆和注册。\n\n通过`sls`命令进行部署，并可以添加`--debug`参数查看部署过程中的信息\n\n```bash\n$ sls deploy\n```\n\n### 4. 查看状态\n\n在`serverless.yml`文件所在的目录下，通过如下命令查看部署状态：\n\n```\n$ serverless info\n```\n\n### 5. 移除\n\n通过以下命令移除部署的 API 网关\n\n```bash\n$ sls remove\n```\n\n### 账号配置（可选）\n\n当前默认支持 CLI 扫描二维码登录，如您希望配置持久的环境变量/秘钥信息，也可以本地创建 `.env` 文件\n\n```bash\n$ touch .env # 腾讯云的配置信息\n```\n\n在 `.env` 文件中配置腾讯云的 SecretId 和 SecretKey 信息并保存\n\n如果没有腾讯云账号，可以在此[注册新账号](https://cloud.tencent.com/register)。\n\n如果已有腾讯云账号，可以在[API 密钥管理](https://console.cloud.tencent.com/cam/capi)中获取 `SecretId` 和`SecretKey`.\n\n```\n# .env\nTENCENT_SECRET_ID=123\nTENCENT_SECRET_KEY=123\n```\n\n## License\n\nMIT License\n\nCopyright (c) 2020 Tencent Cloud, Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless-components%2Ftencent-apigateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserverless-components%2Ftencent-apigateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless-components%2Ftencent-apigateway/lists"}