# express **Repository Path**: anycodes_admin/express ## Basic Information - **Project Name**: express - **Description**: express 应用 - **Primary Language**: TypeScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-04-29 - **Last Updated**: 2021-04-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 阿里云 Express 框架组件 ## 快速体验 - 初始化项目:`s init devsapp/start-express` - 进入项目后部署:`s deploy` - 部署过程中可能需要阿里云密钥的支持,部署完成之后会获得到临时域名可供测试 ## 示例Yaml ```yaml edition: 1.0.0 # 命令行YAML规范版本,遵循语义化版本(Semantic Versioning)规范 name: functionApp # 项目名称 access: default # 秘钥别名 services: tornadoExample: # 服务名称 component: devsapp/tornado # 组件名称 actions: pre-deploy: # 在deploy之前运行 - run: pip3 install -t ./tmp -r requirements.txt # 要运行的命令行 path: ./src # 命令行运行的路径 props: # 组件的属性值 region: cn-shenzhen service: name: serverless-devs description: Serverless Devs示例程序 function: name: express description: Express项目 memorySize: 256 code: src: ./src customContainerConfig: command: '["python3"]' args: '["index.py"]' environmentVariables: PYTHONPATH: /mnt/auto:/mnt/auto/tmp ``` ## 完整Yaml ``` edition: 1.0.0 # 命令行YAML规范版本,遵循语义化版本(Semantic Versioning)规范 name: flaskApp # 项目名称 access: aliyun-release # 秘钥别名 services: framework-test: # 服务名称 component: flask # 组件名称 props: region: cn-shenzhen # 阿里云函数计算所支持的地区 service: name: web-flask # 服务名 # logConfig: Auto # 日志配置,可以是Auto logConfig: logStore: test # loghub中的logstore名称 project: test # loghub中的project名称 description: 测试环节 # 所在服务描述 # role: auto # 角色 role: name: test # 角色名 statement: # 角色授权 statement,配置后不生效 service 不生效, statement 和 service 必填其一 - Effect: Deny # Effect设置,同意或拒绝 Action: sts:AssumeRole # 行为,动作 Principal: Principal function: name: test # 函数名 description: test # 函数描述 customContainerConfig: # 自定义镜像配置 image: registry.cn-shenzhen.aliyuncs.com/test-wss/nodejs12:v0.1 # 镜像仓库地址 command: '["node", "index.js"]' # 启动指令 args: '["--port", "9000"]' # 启动参数 caPort: 9000 # 监听端口 code: # 代码包配置 src: ./src # 本地路径 excludes: # ignore文件 - package-lock.json environmentVariables: # 环境变量配置 test: demo trigger: # 触发器配置 name: def # 触发器名称 type: http # 触发器类型,只支持http config: # 触发器详情 authType: anonymous # 权限配置 methods: # 请求方法 - GET - POST - PUT customDomains: # 自定义域名配置 - domainName: Auto # 自动获取域名,*.devsapp.cn protocol: HTTP # 协议 routeConfigs: # 路径配置 - path: '/*' - domainName: test.shoushuai.top protocol: HTTP,HTTPS routeConfigs: - path: '/' certConfig: # http证书配置 certName: test certificate: ./certConfigCutom/cate.pem privateKey: ./certConfigCutom/key.pem ```