Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
@gosls/tencent-bottle
Advanced tools
腾讯云 Bottle Serverless Component, 支持 Restful API 服务的部署.
安装Pyramid,新建python文件,例如app.py
:
from bottle import route, run, template
@route('/hello/<name>')
def index(name):
return template('<b>Hello {{name}}</b>!', name=name)
并将python所需要的依赖安装到项目目录,例如本实例需要bottle
,所以可以通过pip
进行安装:
pip install bottle -t ./
如果因为网络问题,可以考虑使用国内源,例如:
pip install bottle -t ./ -i https://pypi.tuna.tsinghua.edu.cn/simple
通过 npm 全局安装 serverless cli
$ npm install -g serverless
本地创建 serverless.yml
文件,在其中进行如下配置
$ touch serverless.yml
BottleTest:
component: '@gosls/tencent-bottle'
inputs:
region: ap-guangzhou
functionName: BottleFunctionTest
code: ./
functionConf:
timeout: 10
memorySize: 256
environment:
variables:
TEST: vale
vpcConfig:
subnetId: ''
vpcId: ''
apigatewayConf:
protocols:
- http
environment: release
如您的账号未 登陆 或 注册 腾讯云,您可以直接通过 微信
扫描命令行中的二维码进行授权登陆和注册。
通过 sls
命令进行部署,并可以添加 --debug
参数查看部署过程中的信息
$ sls --debug
通过以下命令移除部署的服务
$ sls remove --debug
当前默认支持 CLI 扫描二维码登录,如您希望配置持久的环境变量/秘钥信息,也可以本地创建 .env
文件
$ touch .env # 腾讯云的配置信息
在 .env
文件中配置腾讯云的 SecretId 和 SecretKey 信息并保存
如果没有腾讯云账号,可以在此 注册新账号。
如果已有腾讯云账号,可以在 API 密钥管理 中获取 SecretId
和SecretKey
.
# .env
TENCENT_SECRET_ID=123
TENCENT_SECRET_KEY=123
FAQs
* 该组件的功能:支持Serverless Framework的指定组件部署 * 该组件对应的官方依赖地址:https://github.com/serverless-components/tencent-bottle
The npm package @gosls/tencent-bottle receives a total of 1 weekly downloads. As such, @gosls/tencent-bottle popularity was classified as not popular.
We found that @gosls/tencent-bottle demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.