2020-11-21 23:27:38 +08:00
2020-11-21 23:27:38 +08:00
2020-11-22 12:16:50 +08:00
2020-11-22 12:15:47 +08:00

alibabacloudfn-template

Alibaba Cloud Function Template

Use this template you need to install:

Usage:

Create new project:

$ kickstart https://git.hatter.ink/templates/alibabacloudfn-template.git

Build:

$ just buildfn

构建后会生成 code.zip 文件

Deploy: aliyun.com -> 控制台 -> 函数计算 -> 服务/函数 -> 新建函数

填定表单:

Build and deploy:

$ just buildfndeploy

Sample output:

$ curl https://174******.cn-shanghai.fc.aliyuncs.com/2016-08-15/proxy/hatter_fc/test_rust_fn/
GET /2016-08-15/proxy/hatter_fc/test_rust_fn/ HTTP/1.1
host: 174******.cn-shanghai.fc.aliyuncs.com
user-agent: curl/7.64.1
accept: */*
x-fc-access-key-id: 
x-fc-access-key-secret: 
x-fc-account-id: 174******
x-fc-base-path: /2016-08-15/proxy/hatter_fc/test_rust_fn/
x-fc-control-path: /http-invoke
x-fc-function-handler: index.handler
x-fc-function-memory: 128
x-fc-function-name: test_rust_fn
x-fc-function-timeout: 30
x-fc-qualifier: LATEST
x-fc-region: cn-shanghai
x-fc-request-id: 0af673e9-030b-4b30-949c-60c96a3a326d
x-fc-retry-count: 0
x-fc-security-token: 
x-fc-service-logproject: 
x-fc-service-logstore: 
x-fc-service-name: hatter_fc
x-fc-tracing-jaeger-endpoint: 
x-fc-tracing-opentracing-span-baggages: 
x-fc-tracing-opentracing-span-context: 
x-fc-version-id: 
x-forwarded-for: 125.118.80.*
x-forwarded-proto: https
accept-encoding: gzip
Description
Alibaba Cloud Function Template
Readme 192 KiB
Languages
Rust 98.8%
Shell 1.2%