Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
@gosls/tencent-bottle
Advanced tools
腾讯云 Bottle Serverless Component, 支持 Restful API 服务的部署.
安装Bottle,新建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
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
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.